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;
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)));
void Train::block_reserved(const Block &block, const Train *train)
{
- if(&block==pending_block && !train)
+ if(&block==pending_block && !train && !reserving)
reserve_more();
}