Skip to content

Commit 43a2371

Browse files
committed
MainWindow: zoom to min/max when value is out of bound, show everithing
1 parent d3f32ac commit 43a2371

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

viewer/mainwindow.cpp

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,32 @@ void MainWindow::loadSVG()
110110
return;
111111
}
112112

113+
//Show everithing
114+
for(ssplib::ItemBase& label : stationPlan->labels)
115+
{
116+
label.visible = true;
117+
}
118+
for(ssplib::ItemBase& track : stationPlan->platforms)
119+
{
120+
track.visible = true;
121+
}
122+
for(ssplib::ItemBase& track : stationPlan->trackConnections)
123+
{
124+
track.visible = true;
125+
}
126+
stationPlan->drawLabels = true;
127+
stationPlan->drawTracks = true;
128+
stationPlan->platformPenWidth = 2;
129+
113130
setZoom(100);
114131
zoomToFit();
115132
}
116133

117134
void MainWindow::setZoom(int val)
118135
{
119-
if(val == zoom || val > 400 || val < 25)
136+
val = qBound(25, val, 400);
137+
138+
if(val == zoom)
120139
return;
121140

122141
zoom = val;

0 commit comments

Comments
 (0)