Skip to content

Commit 86a1683

Browse files
committed
Fixed add button enablement
1 parent 08c18bf commit 86a1683

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Source/PluginEditor.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,7 @@ void PlugDataPluginEditor::updateCommandStatus()
609609
canRedo = libpd_can_redo(getCurrentCanvas()->patch.getPointer()) && pd.locked == var(false);
610610
}
611611

612+
toolbarButton(Add)->setEnabled(pd.locked == var(true));
612613
toolbarButton(Redo)->setEnabled(canRedo);
613614
toolbarButton(Undo)->setEnabled(canUndo);
614615

@@ -631,8 +632,6 @@ void PlugDataPluginEditor::getAllCommands(Array<CommandID>& commands)
631632

632633
void PlugDataPluginEditor::getCommandInfo(const CommandID commandID, ApplicationCommandInfo& result)
633634
{
634-
toolbarButton(Add)->setEnabled(pd.locked == var(false));
635-
636635
bool hasBoxSelection = false;
637636
bool hasSelection = false;
638637

0 commit comments

Comments
 (0)