Skip to content

Commit 0718548

Browse files
committed
Only activate chain when button is on
1 parent 04f34c2 commit 0718548

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

Source/UI/EditorViewport.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,15 +1075,15 @@ SignalChainTabButton::SignalChainTabButton() : Button("Name"),
10751075

10761076
void SignalChainTabButton::clicked()
10771077
{
1078+
if (getToggleState())
1079+
{
1080+
//std::cout << "Button clicked: " << firstEditor->getName() << std::endl;
1081+
EditorViewport* ev = (EditorViewport*) getParentComponent();
10781082

1079-
//std::cout << "Button clicked: " << firstEditor->getName() << std::endl;
1080-
EditorViewport* ev = (EditorViewport*) getParentComponent();
1081-
1082-
scm->updateVisibleEditors(firstEditor, 0, 0, ACTIVATE);
1083-
ev->leftmostEditor = offset;
1084-
ev->refreshEditors();
1085-
1086-
1083+
scm->updateVisibleEditors(firstEditor, 0, 0, ACTIVATE);
1084+
ev->leftmostEditor = offset;
1085+
ev->refreshEditors();
1086+
}
10871087
}
10881088

10891089
void SignalChainTabButton::paintButton(Graphics& g, bool isMouseOver, bool isButtonDown)
@@ -1468,7 +1468,7 @@ const String EditorViewport::loadState(File fileToLoad)
14681468
bool pluginAPI = false;
14691469
bool rhythmNodePatch = false;
14701470
String versionString;
1471-
1471+
14721472
forEachXmlChildElement(*xml, element)
14731473
{
14741474
if (element->hasTagName("INFO"))

0 commit comments

Comments
 (0)