mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-07 09:56:59 +00:00
Fix shading mode when right mouse button != paint w/bg color
This commit is contained in:
parent
e683b8fb1a
commit
c34f0e4eb7
@ -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()) {
|
||||
|
Loading…
Reference in New Issue
Block a user