Skip to content

Commit 0c3dcfa

Browse files
committed
More command input improvements
1 parent d2bc9b6 commit 0c3dcfa

File tree

4 files changed

+173
-140
lines changed

4 files changed

+173
-140
lines changed

Source/Object.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,8 @@ void Object::setType(String const& newType, pd::WeakReference existingObject)
420420

421421
if (checkedOut && checkedIn && (outlet->isSignal == iolets[0]->isSignal) && (inlet->isSignal == iolets[this->numInputs]->isSignal)) {
422422
// Call async to make sure the object is created before the connection
423-
MessageManager::callAsync([this, outlet, inlet]() {
423+
MessageManager::callAsync([_this = SafePointer(this), this, outlet, inlet]() {
424+
if(!_this) return;
424425
cnv->connections.add(cnv, outlet, iolets[0], nullptr);
425426
cnv->connections.add(cnv, iolets[this->numInputs], inlet, nullptr);
426427
});

Source/PluginEditor.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1637,6 +1637,8 @@ bool PluginEditor::perform(InvocationInfo const& info)
16371637
cnv->deselectAll();
16381638
if (auto* obj = cnv->objects.back())
16391639
cnv->setSelected(obj, true); // Select newly created object
1640+
1641+
sidebar->updateCommandInputTarget();
16401642
return true;
16411643
}
16421644

0 commit comments

Comments
 (0)