Rename NewLayerGroup command -> NewGroup command

This commit is contained in:
David Capello 2016-06-08 15:20:11 -03:00
parent 44f44c3126
commit 33d7f6509f
4 changed files with 13 additions and 13 deletions

View File

@ -664,7 +664,7 @@
<item command="LayerVisibility" text="&amp;Visible" /> <item command="LayerVisibility" text="&amp;Visible" />
<separator /> <separator />
<item command="NewLayer" text="&amp;New Layer" /> <item command="NewLayer" text="&amp;New Layer" />
<item command="NewLayerGroup" text="New &amp;Group" /> <item command="NewGroup" text="New &amp;Group" />
<item command="RemoveLayer" text="&amp;Remove Layer" /> <item command="RemoveLayer" text="&amp;Remove Layer" />
<item command="BackgroundFromLayer" text="&amp;Background from Layer" /> <item command="BackgroundFromLayer" text="&amp;Background from Layer" />
<item command="LayerFromBackground" text="&amp;Layer from Background" /> <item command="LayerFromBackground" text="&amp;Layer from Background" />

View File

@ -228,8 +228,8 @@ add_library(app-lib
commands/cmd_new_file.cpp commands/cmd_new_file.cpp
commands/cmd_new_frame.cpp commands/cmd_new_frame.cpp
commands/cmd_new_frame_tag.cpp commands/cmd_new_frame_tag.cpp
commands/cmd_new_group.cpp
commands/cmd_new_layer.cpp commands/cmd_new_layer.cpp
commands/cmd_new_layer_set.cpp
commands/cmd_new_sprite_from_selection.cpp commands/cmd_new_sprite_from_selection.cpp
commands/cmd_onionskin.cpp commands/cmd_onionskin.cpp
commands/cmd_open_file.cpp commands/cmd_open_file.cpp

View File

@ -27,30 +27,30 @@ namespace app {
using namespace ui; using namespace ui;
class NewLayerGroupCommand : public Command { class NewGroupCommand : public Command {
public: public:
NewLayerGroupCommand(); NewGroupCommand();
Command* clone() const override { return new NewLayerGroupCommand(*this); } Command* clone() const override { return new NewGroupCommand(*this); }
protected: protected:
bool onEnabled(Context* context) override; bool onEnabled(Context* context) override;
void onExecute(Context* context) override; void onExecute(Context* context) override;
}; };
NewLayerGroupCommand::NewLayerGroupCommand() NewGroupCommand::NewGroupCommand()
: Command("NewLayerGroup", : Command("NewGroup",
"New Layer Group", "New Layer Group",
CmdRecordableFlag) CmdRecordableFlag)
{ {
} }
bool NewLayerGroupCommand::onEnabled(Context* context) bool NewGroupCommand::onEnabled(Context* context)
{ {
return context->checkFlags(ContextFlags::ActiveDocumentIsWritable | return context->checkFlags(ContextFlags::ActiveDocumentIsWritable |
ContextFlags::HasActiveSprite); ContextFlags::HasActiveSprite);
} }
void NewLayerGroupCommand::onExecute(Context* context) void NewGroupCommand::onExecute(Context* context)
{ {
ContextWriter writer(context); ContextWriter writer(context);
Document* document(writer.document()); Document* document(writer.document());
@ -76,12 +76,12 @@ void NewLayerGroupCommand::onExecute(Context* context)
update_screen_for_document(document); update_screen_for_document(document);
StatusBar::instance()->invalidate(); StatusBar::instance()->invalidate();
StatusBar::instance()->showTip(1000, "Layer `%s' created", name.c_str()); StatusBar::instance()->showTip(1000, "Group `%s' created", name.c_str());
} }
Command* CommandFactory::createNewLayerGroupCommand() Command* CommandFactory::createNewGroupCommand()
{ {
return new NewLayerGroupCommand; return new NewGroupCommand;
} }
} // namespace app } // namespace app

View File

@ -78,8 +78,8 @@ FOR_EACH_COMMAND(NewBrush)
FOR_EACH_COMMAND(NewFile) FOR_EACH_COMMAND(NewFile)
FOR_EACH_COMMAND(NewFrame) FOR_EACH_COMMAND(NewFrame)
FOR_EACH_COMMAND(NewFrameTag) FOR_EACH_COMMAND(NewFrameTag)
FOR_EACH_COMMAND(NewGroup)
FOR_EACH_COMMAND(NewLayer) FOR_EACH_COMMAND(NewLayer)
FOR_EACH_COMMAND(NewLayerGroup)
FOR_EACH_COMMAND(NewSpriteFromSelection) FOR_EACH_COMMAND(NewSpriteFromSelection)
FOR_EACH_COMMAND(OpenFile) FOR_EACH_COMMAND(OpenFile)
FOR_EACH_COMMAND(OpenInFolder) FOR_EACH_COMMAND(OpenInFolder)