btn_expand->signal_clicked.connect(sigc::mem_fun(this, &TrainDialog::expand_clicked));
lbl_speed = dynamic_cast<GLtk::Label *>(get_item(widgets, "lbl_speed"));
sld_speed = dynamic_cast<GLtk::Slider *>(get_item(widgets, "sld_speed"));
+ float max_speed = train.get_maximum_speed();
+ if(max_speed>0)
+ sld_speed->set_range(0, max_speed*3.6/train.get_layout().get_catalogue().get_scale());
sld_speed->signal_value_changed.connect(sigc::mem_fun(this, &TrainDialog::ui_speed_changed));
tgl_forward = dynamic_cast<GLtk::Toggle *>(get_item(widgets, "tgl_forward"));
tgl_forward->signal_toggled.connect(sigc::mem_fun(this, &TrainDialog::ui_forward_toggled));