From ed280df9b9f9fbfaf31f69ce3dd1b5dca8dbbc33 Mon Sep 17 00:00:00 2001 From: Austin Wright Date: Mon, 23 May 2022 10:07:12 -0700 Subject: [PATCH] Scene editor: Immediately update tabs in when fixture selection changes Currently, when the view is changed between the Tab View and the All Fixtures View, only the fixtures selected in the General tab are populated. This adds a signal to update the tabs and consoles immediately when the selection changes. --- ui/src/sceneeditor.cpp | 7 +++++++ ui/src/sceneeditor.h | 1 + 2 files changed, 8 insertions(+) diff --git a/ui/src/sceneeditor.cpp b/ui/src/sceneeditor.cpp index dbfcafa507..917c5c522a 100644 --- a/ui/src/sceneeditor.cpp +++ b/ui/src/sceneeditor.cpp @@ -334,6 +334,8 @@ void SceneEditor::init(bool applyValues) } connect(m_channelGroupsTree, SIGNAL(itemChanged(QTreeWidgetItem*,int)), this, SLOT(slotChannelGroupsChanged(QTreeWidgetItem*,int))); + connect(m_tree, SIGNAL(itemSelectionChanged()), + this, SLOT(selectedFixturesChanged())); connect(m_enableChannelsButton, SIGNAL(clicked()), this, SLOT(slotEnableAll())); connect(m_disableChannelsButton, SIGNAL(clicked()), @@ -904,6 +906,11 @@ void SceneEditor::slotModeChanged(Doc::Mode mode) } +void SceneEditor::selectedFixturesChanged() +{ + slotViewModeChanged(m_tabViewAction->isChecked(), true); +} + void SceneEditor::slotViewModeChanged(bool tabbed, bool applyValues) { m_tab->blockSignals(true); diff --git a/ui/src/sceneeditor.h b/ui/src/sceneeditor.h index 05158ec616..8e226a12ff 100644 --- a/ui/src/sceneeditor.h +++ b/ui/src/sceneeditor.h @@ -176,6 +176,7 @@ public slots: private slots: /** called when the user check/uncheck a group of m_channelGroupsTree */ + void selectedFixturesChanged(); void slotChannelGroupsChanged(QTreeWidgetItem*item, int column); /** Called when the user moves a fader of the ChannelGroup console */