From d2333df8c914009f3ebdcc5e11402e6edccc924e Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Fri, 11 Apr 2014 20:24:51 +0300 Subject: [PATCH] Populate the target variable when a timetable row is selected Failing to do so will clear the target from the row when applying changes. --- source/engineer/timetablepanel.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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)); } } -- 2.43.0