core: added signalling for timecode display changes
Allows targeted application-wide UI updates for when the user changes the timecode display so that the response is immediate.
This commit is contained in:
@@ -100,9 +100,6 @@ MainMenu::MainMenu(QMainWindow *parent) :
|
||||
view_show_all_item_ = view_menu_->AddItem("showall", nullptr, nullptr, "\\");
|
||||
view_show_all_item_->setCheckable(true);
|
||||
view_menu_->addSeparator();
|
||||
view_rectified_waveforms_item_ = view_menu_->AddItem("rectifiedwaveforms", nullptr, nullptr);
|
||||
view_rectified_waveforms_item_->setCheckable(true);
|
||||
view_menu_->addSeparator();
|
||||
|
||||
frame_view_mode_group_ = new QActionGroup(this);
|
||||
|
||||
@@ -327,7 +324,7 @@ void MainMenu::TimecodeDisplayTriggered()
|
||||
Timecode::Display display = static_cast<Timecode::Display>(action->data().toInt());
|
||||
|
||||
// Set the current display mode
|
||||
Timecode::SetCurrentDisplay(display);
|
||||
Core::instance()->SetTimecodeDisplay(display);
|
||||
}
|
||||
|
||||
void MainMenu::FileMenuAboutToShow()
|
||||
@@ -343,7 +340,7 @@ void MainMenu::ViewMenuAboutToShow()
|
||||
// Ensure checked timecode display mode is correct
|
||||
QList<QAction*> timecode_display_actions = frame_view_mode_group_->actions();
|
||||
foreach (QAction* a, timecode_display_actions) {
|
||||
if (a->data() == Timecode::CurrentDisplay()) {
|
||||
if (a->data() == Core::instance()->GetTimecodeDisplay()) {
|
||||
a->setChecked(true);
|
||||
break;
|
||||
}
|
||||
@@ -553,7 +550,6 @@ void MainMenu::Retranslate()
|
||||
view_increase_track_height_item_->setText(tr("Increase Track Height"));
|
||||
view_decrease_track_height_item_->setText(tr("Decrease Track Height"));
|
||||
view_show_all_item_->setText(tr("Toggle Show All"));
|
||||
view_rectified_waveforms_item_->setText(tr("Rectified Waveforms"));
|
||||
view_timecode_view_frames_item_->setText(tr("Frames"));
|
||||
view_timecode_view_dropframe_item_->setText(tr("Drop Frame"));
|
||||
view_timecode_view_nondropframe_item_->setText(tr("Non-Drop Frame"));
|
||||
|
||||
Reference in New Issue
Block a user