Enable the correct shift amount text box when opening the shift times dialog rather than always enabling the time one

Originally committed to SVN as r5735.
This commit is contained in:
Thomas Goyne 2011-10-12 23:08:02 +00:00
parent b7efafe3b8
commit 54f359f91b
1 changed files with 6 additions and 1 deletions

View File

@ -103,12 +103,17 @@ DialogShiftTimes::DialogShiftTimes(agi::Context *context)
shift_time->SetTime(OPT_GET("Tool/Shift Times/Time")->GetInt());
*shift_frames << (int)OPT_GET("Tool/Shift Times/Frames")->GetInt();
shift_frames->Disable();
shift_by_frames->SetValue(!OPT_GET("Tool/Shift Times/ByTime")->GetBool() && shift_by_frames->IsEnabled());
time_fields->SetSelection(OPT_GET("Tool/Shift Times/Type")->GetInt());
selection_mode->SetSelection(OPT_GET("Tool/Shift Times/Affect")->GetInt());
shift_backward->SetValue(OPT_GET("Tool/Shift Times/Direction")->GetBool());
if (shift_by_frames->GetValue())
shift_time->Disable();
else
shift_frames->Disable();
// Position controls
wxSizer *shift_amount_sizer = new wxFlexGridSizer(2, 2, 5, 5);
shift_amount_sizer->Add(shift_by_time, wxSizerFlags(0).Align(wxALIGN_CENTER_VERTICAL));