]> git.sesse.net Git - nageru/commitdiff
When the output card is active, disable the controls to change the master clock ...
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 10 Feb 2017 23:45:05 +0000 (00:45 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 10 Feb 2017 23:45:05 +0000 (00:45 +0100)
glwidget.cpp

index 34943389e6aa0b3429ea8d8073f1a374a6ea9e46..ae4b62f09da9b1d17039c84dcb8f4373d561af08 100644 (file)
@@ -320,7 +320,10 @@ void GLWidget::show_preview_context_menu(unsigned signal_num, const QPoint &pos)
        // And a master clock selector.
        QAction *master_clock_action = new QAction("Use as master clock", &menu);
        master_clock_action->setCheckable(true);
-       if (global_mixer->get_master_clock() == signal_num) {
+       if (global_mixer->get_output_card_index() != -1) {
+               master_clock_action->setChecked(false);
+               master_clock_action->setEnabled(false);
+       } else if (global_mixer->get_master_clock() == signal_num) {
                master_clock_action->setChecked(true);
                master_clock_action->setEnabled(false);
        }