Skip to content

Commit 9d53199

Browse files
do not make maximum for mapResolutionUpDown larger then the maximum defined in the Designer
1 parent 93424fa commit 9d53199

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Source/RunActivity/Viewer3D/Map/MapForm.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,11 @@ private void InitializeData()
364364
var maxsize = maxX - minX > maxY - minY ? maxX - minX : maxY - minY;
365365
// Take up to next 500
366366
maxsize = (int)((maxsize / 100) + 1) * 500;
367-
mapResolutionUpDown.Maximum = (decimal)maxsize;
367+
if ((decimal)maxsize < mapResolutionUpDown.Maximum)
368+
{
369+
// do not make maximum larger then the maximum defined in the Designer
370+
mapResolutionUpDown.Maximum = (decimal)maxsize;
371+
}
368372
Inited = true;
369373

370374
if (simulator.TDB == null || simulator.TDB.TrackDB == null || simulator.TDB.TrackDB.TrItemTable == null)

0 commit comments

Comments
 (0)