Skip to content

Commit

Permalink
Removed log statement, now showing an inlet outline when autoconnect …
Browse files Browse the repository at this point in the history
…is about to happen
  • Loading branch information
timothyschoen committed Sep 22, 2023
1 parent 729438d commit a66e454
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 8 additions & 0 deletions Source/Object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,14 @@ Array<Rectangle<float>> Object::getCorners() const

void Object::paintOverChildren(Graphics& g)
{
if(getValue<bool>(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<float>{16, 4, 8, 8}, 1.0f);
}

if (consoleTarget == this) {
g.saveState();

Expand Down
1 change: 0 additions & 1 deletion Source/PluginEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1511,7 +1511,6 @@ bool PluginEditor::perform(InvocationInfo const& info)
auto obj = cnv->getSelectionOfType<Object>()[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<int>(
Expand Down

0 comments on commit a66e454

Please sign in to comment.