mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-06 12:39:57 +00:00
Apply brush size when clicking on brush icon
This commit is contained in:
parent
910612101a
commit
f1b597d4ed
@ -18,6 +18,7 @@
|
||||
#include "app/modules/gui.h"
|
||||
#include "app/modules/palettes.h"
|
||||
#include "app/pref/preferences.h"
|
||||
#include "app/tools/tool.h"
|
||||
#include "app/ui/app_menuitem.h"
|
||||
#include "app/ui/button_set.h"
|
||||
#include "app/ui/context_bar.h"
|
||||
@ -96,8 +97,19 @@ private:
|
||||
|
||||
if (m_slot >= 0)
|
||||
contextBar->setActiveBrushBySlot(m_slot);
|
||||
else if (m_brush.hasBrush())
|
||||
contextBar->setActiveBrush(m_brush.brush());
|
||||
else if (m_brush.hasBrush()) {
|
||||
tools::Tool* tool = App::instance()->activeTool();
|
||||
auto& brushPref = Preferences::instance().tool(tool).brush;
|
||||
BrushRef brush;
|
||||
|
||||
brush.reset(
|
||||
new Brush(
|
||||
static_cast<doc::BrushType>(m_brush.brush()->type()),
|
||||
brushPref.size(),
|
||||
brushPref.angle()));
|
||||
|
||||
contextBar->setActiveBrush(brush);
|
||||
}
|
||||
}
|
||||
|
||||
AppBrushes& m_brushes;
|
||||
|
Loading…
x
Reference in New Issue
Block a user