mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-21 03:40:57 +00:00
Disable Shift+click to draw straight lines when we are in SelectBoxState
This commit is contained in:
parent
23ea6a392e
commit
c7955337c2
@ -104,6 +104,9 @@ namespace app {
|
|||||||
virtual void postRenderDecorator(EditorPostRender* render) override;
|
virtual void postRenderDecorator(EditorPostRender* render) override;
|
||||||
virtual void getInvalidDecoratoredRegion(Editor* editor, gfx::Region& region) override;
|
virtual void getInvalidDecoratoredRegion(Editor* editor, gfx::Region& region) override;
|
||||||
|
|
||||||
|
// Disable Shift+click to draw straight lines with the Pencil tool
|
||||||
|
virtual bool canCheckStartDrawingStraightLine() { return false; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef std::vector<Ruler> Rulers;
|
typedef std::vector<Ruler> Rulers;
|
||||||
|
|
||||||
|
@ -639,7 +639,8 @@ bool StandbyState::checkStartDrawingStraightLine(Editor* editor,
|
|||||||
const ui::MouseMessage* msg)
|
const ui::MouseMessage* msg)
|
||||||
{
|
{
|
||||||
// Start line preview with shift key
|
// Start line preview with shift key
|
||||||
if (editor->startStraightLineWithFreehandTool(msg)) {
|
if (canCheckStartDrawingStraightLine() &&
|
||||||
|
editor->startStraightLineWithFreehandTool(msg)) {
|
||||||
tools::Pointer::Button pointerButton =
|
tools::Pointer::Button pointerButton =
|
||||||
(msg ? button_from_msg(msg): tools::Pointer::Left);
|
(msg ? button_from_msg(msg): tools::Pointer::Left);
|
||||||
|
|
||||||
|
@ -54,6 +54,7 @@ namespace app {
|
|||||||
protected:
|
protected:
|
||||||
void callEyedropper(Editor* editor, const ui::MouseMessage* msg);
|
void callEyedropper(Editor* editor, const ui::MouseMessage* msg);
|
||||||
bool checkStartDrawingStraightLine(Editor* editor, const ui::MouseMessage* msg);
|
bool checkStartDrawingStraightLine(Editor* editor, const ui::MouseMessage* msg);
|
||||||
|
virtual bool canCheckStartDrawingStraightLine() { return true; }
|
||||||
|
|
||||||
class Decorator : public EditorDecorator {
|
class Decorator : public EditorDecorator {
|
||||||
public:
|
public:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user