Show checkbox in Palette > Palette Editor menu item when the Palette Editor is visible

This commit is contained in:
blackmiaool 2015-05-04 13:02:58 +08:00
parent 9bf11e0b40
commit 1d98f51197

View File

@ -138,6 +138,7 @@ public:
protected:
void onLoadParams(const Params& params) override;
void onExecute(Context* context) override;
bool onChecked(Context* context) override;
private:
bool m_open;
@ -225,6 +226,15 @@ void PaletteEditorCommand::onExecute(Context* context)
}
}
bool PaletteEditorCommand::onChecked(Context* context)
{
if(!g_window)
{
return false;
}
return g_window->isVisible();
}
//////////////////////////////////////////////////////////////////////
// PaletteEntryEditor implementation
//