From a66e454c24932779e25e2659253fdf451db0ca1f Mon Sep 17 00:00:00 2001 From: Timothy Schoen Date: Fri, 22 Sep 2023 19:46:09 +0200 Subject: [PATCH] Removed log statement, now showing an inlet outline when autoconnect is about to happen --- Source/Object.cpp | 8 ++++++++ Source/PluginEditor.cpp | 1 - 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Source/Object.cpp b/Source/Object.cpp index 8937c569e..e3a864e29 100644 --- a/Source/Object.cpp +++ b/Source/Object.cpp @@ -430,6 +430,14 @@ Array> Object::getCorners() const void Object::paintOverChildren(Graphics& g) { + if(getValue(cnv->editor->autoconnect) && isInitialEditorShown() && cnv->lastSelectedObject && cnv->lastSelectedObject != this && cnv->lastSelectedObject->numOutputs) + { + auto outlet = cnv->lastSelectedObject->iolets[cnv->lastSelectedObject->numInputs]; + + g.setColour(findColour(outlet->isSignal ? PlugDataColour::signalColourId : PlugDataColour::dataColourId)); + g.drawEllipse(Rectangle{16, 4, 8, 8}, 1.0f); + } + if (consoleTarget == this) { g.saveState(); diff --git a/Source/PluginEditor.cpp b/Source/PluginEditor.cpp index 886849023..2cd10126f 100644 --- a/Source/PluginEditor.cpp +++ b/Source/PluginEditor.cpp @@ -1511,7 +1511,6 @@ bool PluginEditor::perform(InvocationInfo const& info) auto obj = cnv->getSelectionOfType()[0]; obj->hideEditor(); // If it's still open, it might overwrite lastSelectedObject cnv->lastSelectedObject = obj; - std::cout << "assigned last selection" << std::endl; if (obj) { cnv->objects.add(new Object(cnv, objectNames.at(ID), Point(