From: Mikko Rasa Date: Fri, 11 Apr 2014 17:24:51 +0000 (+0300) Subject: Populate the target variable when a timetable row is selected X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=d2333df8c914009f3ebdcc5e11402e6edccc924e;p=r2c2.git Populate the target variable when a timetable row is selected Failing to do so will clear the target from the row when applying changes. --- diff --git a/source/engineer/timetablepanel.cpp b/source/engineer/timetablepanel.cpp index 12ae2a8..4232f2c 100644 --- a/source/engineer/timetablepanel.cpp +++ b/source/engineer/timetablepanel.cpp @@ -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)); } }