]> git.tdb.fi Git - r2c2.git/blobdiff - source/engineer/trainproperties.cpp
UI tweaks
[r2c2.git] / source / engineer / trainproperties.cpp
index bdd39fb97622f2e3c2f707ec892796abc0958ea2..81463d28498a6493281cecbf5558ac8fc927f5a2 100644 (file)
@@ -23,7 +23,7 @@ TrainProperties::TrainProperties(Engineer &e, const GLtk::Resources &r, Train *t
        engineer(e),
        train(t)
 {
-       set_size(200, 275);
+       set_size(250, 275);
 
        GLtk::Label *label;
        add(*(label = new GLtk::Label(res, "Train properties")));
@@ -37,7 +37,7 @@ TrainProperties::TrainProperties(Engineer &e, const GLtk::Resources &r, Train *t
 
        const map<unsigned, VehicleType *> &vehs = engineer.get_catalogue().get_vehicles();
        unsigned n = 0;
-       for(map<unsigned, VehicleType *>::const_iterator i=vehs.begin(); i!=vehs.end(); ++i, ++n)
+       for(map<unsigned, VehicleType *>::const_iterator i=vehs.begin(); i!=vehs.end(); ++i)
        {
                if(!i->second->is_locomotive())
                        continue;
@@ -45,6 +45,8 @@ TrainProperties::TrainProperties(Engineer &e, const GLtk::Resources &r, Train *t
                drp_type->append(format("%d %s", i->second->get_article_number(), i->second->get_name()));
                if(train && i->second==&train->get_locomotive_type())
                        drp_type->set_selected_index(n);
+
+               ++n;
        }
 
        add(*(ent_name = new GLtk::Entry(res)));