Remove the "New Brush" button from the ContextBar

This commit is contained in:
David Capello 2015-04-27 12:07:23 -03:00
parent 955383f91a
commit 51b6def023
2 changed files with 0 additions and 14 deletions

View File

@ -827,8 +827,6 @@ ContextBar::ContextBar()
#endif
m_freehandBox->addChild(m_freehandAlgo = new FreehandAlgorithmField());
addChild(m_newBrush = new Button("New Brush"));
setup_mini_font(m_toleranceLabel);
setup_mini_font(m_opacityLabel);
@ -849,8 +847,6 @@ ContextBar::ContextBar()
"component is used to setup the opacity level of all drawing tools.\n\n"
"When unchecked -the default behavior- the color is picked\n"
"from the composition of all sprite layers.", JI_LEFT | JI_TOP);
tooltipManager->addTooltipFor(m_newBrush,
"Create a brush from the selection.", JI_BOTTOM);
m_selectionMode->setupTooltips(tooltipManager);
m_dropPixels->setupTooltips(tooltipManager);
m_freehandAlgo->setupTooltips(tooltipManager);
@ -859,7 +855,6 @@ ContextBar::ContextBar()
App::instance()->BrushAngleAfterChange.connect(&ContextBar::onBrushAngleChange, this);
App::instance()->CurrentToolChange.connect(&ContextBar::onCurrentToolChange, this);
m_dropPixels->DropPixels.connect(&ContextBar::onDropPixels, this);
m_newBrush->Click.connect(Bind<void>(&ContextBar::onNewBrush, this));
m_discardBrush->Click.connect(Bind<void>(&ContextBar::onDiscardBrush, this));
onCurrentToolChange();
@ -1008,7 +1003,6 @@ void ContextBar::updateFromTool(tools::Tool* tool)
m_selectionOptionsBox->setVisible(hasSelectOptions);
m_selectionMode->setVisible(true);
m_dropPixels->setVisible(false);
m_newBrush->setVisible(hasSelectOptions);
layout();
}
@ -1042,12 +1036,6 @@ void ContextBar::updateAutoSelectLayer(bool state)
m_autoSelectLayer->setSelected(state);
}
void ContextBar::onNewBrush()
{
Command* cmd = CommandsModule::instance()->getCommandByName(CommandId::NewBrush);
UIContext::instance()->executeCommand(cmd);
}
void ContextBar::onDiscardBrush()
{
Command* cmd = CommandsModule::instance()->getCommandByName(CommandId::DiscardBrush);

View File

@ -52,7 +52,6 @@ namespace app {
void onBrushAngleChange();
void onCurrentToolChange();
void onDropPixels(ContextBarObserver::DropAction action);
void onNewBrush();
void onDiscardBrush();
class BrushTypeField;
@ -87,7 +86,6 @@ namespace app {
AutoSelectLayerField* m_autoSelectLayer;
ui::Box* m_freehandBox;
FreehandAlgorithmField* m_freehandAlgo;
ui::Button* m_newBrush;
ui::Button* m_discardBrush;
BrushPatternField* m_brushPatternField;
ui::Box* m_sprayBox;