mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-15 21:40:34 +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 getInvalidDecoratoredRegion(Editor* editor, gfx::Region& region) override;
|
||||
|
||||
// Disable Shift+click to draw straight lines with the Pencil tool
|
||||
virtual bool canCheckStartDrawingStraightLine() { return false; }
|
||||
|
||||
private:
|
||||
typedef std::vector<Ruler> Rulers;
|
||||
|
||||
|
@ -639,7 +639,8 @@ bool StandbyState::checkStartDrawingStraightLine(Editor* editor,
|
||||
const ui::MouseMessage* msg)
|
||||
{
|
||||
// Start line preview with shift key
|
||||
if (editor->startStraightLineWithFreehandTool(msg)) {
|
||||
if (canCheckStartDrawingStraightLine() &&
|
||||
editor->startStraightLineWithFreehandTool(msg)) {
|
||||
tools::Pointer::Button pointerButton =
|
||||
(msg ? button_from_msg(msg): tools::Pointer::Left);
|
||||
|
||||
|
@ -48,12 +48,13 @@ namespace app {
|
||||
virtual Transformation getTransformation(Editor* editor);
|
||||
|
||||
void startSelectionTransformation(Editor* editor, const gfx::Point& move, double angle);
|
||||
|
||||
|
||||
void startFlipTransformation(Editor* editor, doc::algorithm::FlipType flipType);
|
||||
|
||||
|
||||
protected:
|
||||
void callEyedropper(Editor* editor, const ui::MouseMessage* msg);
|
||||
bool checkStartDrawingStraightLine(Editor* editor, const ui::MouseMessage* msg);
|
||||
virtual bool canCheckStartDrawingStraightLine() { return true; }
|
||||
|
||||
class Decorator : public EditorDecorator {
|
||||
public:
|
||||
|
Loading…
x
Reference in New Issue
Block a user