[aseprite] 15/308: Fix shading mode when right mouse button != paint w/bg color
Tobias Hansen
thansen at moszumanska.debian.org
Tue Mar 8 02:44:47 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 c34f0e4eb7cc87263bb4378e31326c4bf1c70202
Author: David Capello <davidcapello at gmail.com>
Date: Fri Nov 20 19:07:53 2015 -0300
Fix shading mode when right mouse button != paint w/bg color
---
src/app/ui/editor/editor.cpp | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/app/ui/editor/editor.cpp b/src/app/ui/editor/editor.cpp
index 534214f..8ee92e8 100644
--- a/src/app/ui/editor/editor.cpp
+++ b/src/app/ui/editor/editor.cpp
@@ -23,6 +23,7 @@
#include "app/modules/gui.h"
#include "app/modules/palettes.h"
#include "app/pref/preferences.h"
+#include "app/pref/preferences.h"
#include "app/tools/ink.h"
#include "app/tools/tool.h"
#include "app/tools/tool_box.h"
@@ -899,8 +900,10 @@ gfx::Point Editor::autoScroll(MouseMessage* msg, AutoScroll dir, bool blitValidR
bool Editor::isCurrentToolAffectedByRightClickMode()
{
tools::Tool* tool = App::instance()->activeTool();
+ bool shadingMode = (Preferences::instance().tool(tool).ink() == tools::InkType::SHADING);
return
- (tool->getInk(0)->isPaint() || tool->getInk(0)->isEffect()) &&
+ ((tool->getInk(0)->isPaint() && !shadingMode) ||
+ (tool->getInk(0)->isEffect())) &&
(!tool->getInk(0)->isEraser());
}
@@ -911,7 +914,8 @@ tools::Tool* Editor::getCurrentEditorTool()
tools::Tool* tool = App::instance()->activeTool();
- if (m_secondaryButton && isCurrentToolAffectedByRightClickMode()) {
+ if (m_secondaryButton &&
+ isCurrentToolAffectedByRightClickMode()) {
tools::ToolBox* toolbox = App::instance()->getToolBox();
switch (Preferences::instance().editor.rightClickMode()) {
--
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