[aseprite] 01/128: Apply brush size when clicking on brush icon
Tobias Hansen
thansen at moszumanska.debian.org
Mon May 9 21:24:16 UTC 2016
This is an automated email from the git hooks/post-receive script.
thansen pushed a commit to branch master
in repository aseprite.
commit f1b597d4edd67ea2dee649e3db2c74da6e280bc4
Author: Ying-Ruei Liang (KK) <thumbd03803 at gmail.com>
Date: Sat Jan 2 11:01:44 2016 +0800
Apply brush size when clicking on brush icon
---
src/app/ui/brush_popup.cpp | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/src/app/ui/brush_popup.cpp b/src/app/ui/brush_popup.cpp
index fffe167..6517c04 100644
--- a/src/app/ui/brush_popup.cpp
+++ b/src/app/ui/brush_popup.cpp
@@ -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;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/aseprite.git
More information about the Pkg-games-commits
mailing list