Skip to content

Commit

Permalink
Fixed add button enablement
Browse files Browse the repository at this point in the history
  • Loading branch information
timothyschoen committed Mar 20, 2022
1 parent 08c18bf commit 86a1683
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Source/PluginEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,7 @@ void PlugDataPluginEditor::updateCommandStatus()
canRedo = libpd_can_redo(getCurrentCanvas()->patch.getPointer()) && pd.locked == var(false);
}

toolbarButton(Add)->setEnabled(pd.locked == var(true));
toolbarButton(Redo)->setEnabled(canRedo);
toolbarButton(Undo)->setEnabled(canUndo);

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

void PlugDataPluginEditor::getCommandInfo(const CommandID commandID, ApplicationCommandInfo& result)
{
toolbarButton(Add)->setEnabled(pd.locked == var(false));

bool hasBoxSelection = false;
bool hasSelection = false;

Expand Down

0 comments on commit 86a1683

Please sign in to comment.