]> git.tdb.fi Git - r2c2.git/commitdiff
Populate the target variable when a timetable row is selected
authorMikko Rasa <tdb@tdb.fi>
Fri, 11 Apr 2014 17:24:51 +0000 (20:24 +0300)
committerMikko Rasa <tdb@tdb.fi>
Fri, 11 Apr 2014 19:35:11 +0000 (22:35 +0300)
Failing to do so will clear the target from the row when applying changes.

source/engineer/timetablepanel.cpp

index 12ae2a820c4a4affa50a925d9bf709a9a4f58c48..4232f2cb16db143397b97b8736ef7c057adf6d58 100644 (file)
@@ -110,8 +110,9 @@ void TimetablePanel::row_selected(unsigned i)
        if(row)
        {
                drp_type->set_selected_index(row->type-1);
-               if(row->target)
-                       lbl_target->set_text(row->target->get_name());
+               target = row->target;
+               if(target)
+                       lbl_target->set_text(target->get_name());
                ent_time->set_text(format_time(row->time));
        }
 }