Skip to content

Commit

Permalink
Fixed #688
Browse files Browse the repository at this point in the history
  • Loading branch information
MaartenHilferink committed Apr 4, 2024
1 parent 7c53718 commit 6eafb06
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 30 deletions.
2 changes: 1 addition & 1 deletion shv/dll/src/GeoTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ struct TRect : Range<TPoint>
};

inline GType TType2GType (TType src) { return src < MinValue<GType>() ? MinValue<GType>() : (src > MaxValue<GType>() ? MaxValue<GType>() : src); }
inline GType CrdType2GType(CrdType src) { return src < MinValue<GType>() ? MinValue<GType>() : (src > MaxValue<GType>() ? MaxValue<GType>() : src); }
inline GType CrdType2GType(CrdType src) { return src < MinValue<GType>() ? MinValue<GType>() : (src > MaxValue<GType>() ? MaxValue<GType>() : RoundDown<sizeof(GType)> (src)); }
inline GPoint CrdPoint2GPoint(CrdPoint src) { return GPoint(CrdType2GType(src.X()), CrdType2GType(src.Y())); }

inline CrdPoint TPoint2CrdPoint(TPoint src, CrdPoint sf) { return shp2dms_order<CrdType>(src.X() * sf.first, src.Y() * sf.second); }
Expand Down
4 changes: 3 additions & 1 deletion shv/dll/src/MovableObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,9 @@ void MovableObject::InvalidateClientRect(CrdRect rect) const
return;

auto dv = GetDataView().lock(); if (!dv) return;
dv->InvalidateDeviceRect( CrdRect2GRect( crdRect ) );

Range<IPoint> tmp = RoundEnclosing<4>(crdRect);
dv->InvalidateDeviceRect( GRect(tmp.first.X(), tmp.first.Y(), tmp.second.X(), tmp.second.Y() ) );
}

CrdPoint MovableObject::CalcClientSize() const
Expand Down
35 changes: 7 additions & 28 deletions shv/dll/src/WmsLayer.h
Original file line number Diff line number Diff line change
@@ -1,31 +1,10 @@
//<HEADER>
/*
Data & Model Server (DMS) is a server written in C++ for DSS applications.
Version: see srv/dms/rtc/dll/src/RtcVersion.h for version info.
// Copyright (C) 1998-2024 Object Vision b.v.
// License: GNU GPL 3
/////////////////////////////////////////////////////////////////////////////

Copyright (C) 1998-2004 YUSE GSO Object Vision BV.
Documentation on using the Data & Model Server software can be found at:
http://www.ObjectVision.nl/DMS/
See additional guidelines and notes in srv/dms/Readme-srv.txt
This library is free software; you can use, redistribute, and/or
modify it under the terms of the GNU General Public License version 2
(the License) as published by the Free Software Foundation,
provided that this entire header notice and readme-srv.txt is preserved.
See LICENSE.TXT for terms of distribution or look at our web site:
http://www.objectvision.nl/DMS/License.txt
or alternatively at: http://www.gnu.org/copyleft/gpl.html
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details. However, specific warranties might be
granted by an additional written contract for support, assistance and/or development
*/
//</HEADER>
#if defined(_MSC_VER)
#pragma once
#endif

#ifndef __SHV_WMSLAYER_H
#define __SHV_WMSLAYER_H
Expand Down Expand Up @@ -85,7 +64,7 @@ struct WmsLayer : GridLayerBase

protected:
// override virtuals of GraphicObject
bool Draw(GraphDrawer& d) const override;
bool Draw(GraphDrawer& d) const override;

void Zoom1To1(ViewPort* vp) override;

Expand Down

0 comments on commit 6eafb06

Please sign in to comment.