Skip to content

Commit 36608e2

Browse files
authored
Merge pull request #986 from mbm-OR/bugfix/TrainCarOperations-resize-window
Fix: The TrainCarOperations window does not resize correctly.
2 parents 58b2418 + 5d7e692 commit 36608e2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Source/RunActivity/Viewer3D/Popups/TrainCarOperationsWindow.cs

+4
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,10 @@ void AddSpace()
495495
Client = ControlLayoutScrollboxVertical.NewClient;
496496
RowsCount = Client.Controls.Where(c => c is ControlLayoutHorizontal).Count();
497497
SeparatorCount = Client.Controls.Where(c => c is Separator).Count();
498+
499+
// Allows to resize the window according to the carPosition value.
500+
if (RowsCount > carPosition) RowsCount = carPosition;
501+
if (SeparatorCount > carPosition -1) SeparatorCount = carPosition - 1;
498502
}
499503
}
500504
return Vbox;

0 commit comments

Comments
 (0)