X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fengineer%2Ftrainproperties.cpp;h=a8d78a028f3e23826dc1ab0db9a72be47f187cee;hb=f409cd39a687900724d987c9db629cbff0dd49be;hp=bdd39fb97622f2e3c2f707ec892796abc0958ea2;hpb=378f04522aa762729c0d5651fb60ad7e4d8ba9f3;p=r2c2.git diff --git a/source/engineer/trainproperties.cpp b/source/engineer/trainproperties.cpp index bdd39fb..a8d78a0 100644 --- a/source/engineer/trainproperties.cpp +++ b/source/engineer/trainproperties.cpp @@ -37,7 +37,7 @@ TrainProperties::TrainProperties(Engineer &e, const GLtk::Resources &r, Train *t const map &vehs = engineer.get_catalogue().get_vehicles(); unsigned n = 0; - for(map::const_iterator i=vehs.begin(); i!=vehs.end(); ++i, ++n) + for(map::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)));