From 4e33775c84e0868f57ecdbaece53b55210972cbf Mon Sep 17 00:00:00 2001 From: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com> Date: Wed, 15 Apr 2020 19:54:59 +0300 Subject: [PATCH] Fixed bug where the user could drag the guides when the canvas had no focus --- CONTRIBUTING.md | 4 ++-- Changelog.md | 5 ++--- Scripts/Main.gd | 2 +- Scripts/Rulers/Guides.gd | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 110828698..c5a78ed2a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -53,5 +53,5 @@ To communicate with developers (e.g. to discuss a feature you want to implement discuss quite specific points about the development, and not general user feedback or support requests. - [Our Discord Server](https://discord.gg/GTMtr8s): All developers and most contributors are there, so it's the best way for direct chat - about Pixelorama. You can use the channel #pixelorama-dev to stay up to date with Pixelorama's developments real-time, - or talk about the developments and request new features. If you seek support, please use the #pixelorama-help channel instead. + about Pixelorama. You can use the channel `#pixelorama-dev` to stay up to date with Pixelorama's developments real-time, + or talk about the developments and request new features. If you seek support, please use the `#pixelorama-help` channel instead. diff --git a/Changelog.md b/Changelog.md index 8a1865f09..868f7864d 100644 --- a/Changelog.md +++ b/Changelog.md @@ -25,7 +25,7 @@ Martin Novák (novhack), luiq54, Schweini07, Marco Galli (Gaarco), Matheus Peseg - Esperanto translation. - When the image is unsaved and the user tries to make a new one, a new warning dialog will appear to ask for confirmation. - A new zoom tool has been added, and you can also zoom in with the `+` key, and zoom out with `-`. -- You can now move the canvas with the `Arrow keys`. `Shift + Arrows` make it move with medium speed, and `Ctrl + Shuft + Arrows` makes it move with high speed. +- You can now move the canvas with the `Arrow keys`. `Shift + Arrows` make it move with medium speed, and `Ctrl + Shift + Arrows` makes it move with high speed. - The left and right tool icon options (found in Preferences) are now saved and restored on startup. ### Changed @@ -51,8 +51,7 @@ Martin Novák (novhack), luiq54, Schweini07, Marco Galli (Gaarco), Matheus Peseg - Fixed issue when moving frames, the current frame was being shown but the frame next to it was actually the one being drawn on. - Fixed issue with LineEdits not letting go of focus when the user clicked somewhere else.! (Issue #167) - When the palette, outline and rotate image dialogs are open, the user can't zoom in the canvas anymore. -- Fixed bug where the user could drag the selection when it had no focus. - +- Fixed bug where the user could drag the selection and the guides when the canvas had no focus. ### Removed - It's no longer possible for frames to have different amounts of layers. All frames have the same amount. diff --git a/Scripts/Main.gd b/Scripts/Main.gd index 803d27433..d698448b2 100644 --- a/Scripts/Main.gd +++ b/Scripts/Main.gd @@ -71,7 +71,7 @@ func _ready() -> void: "Invert colors" : 0, "Desaturation" : 0, "Outline" : 0, - "Adjust Hue/Saturation/Value":0 + "Adjust Hue/Saturation/Value" : 0 } var help_menu_items := { "View Splash Screen" : 0, diff --git a/Scripts/Rulers/Guides.gd b/Scripts/Rulers/Guides.gd index f3eeb7f2f..2636c699a 100644 --- a/Scripts/Rulers/Guides.gd +++ b/Scripts/Rulers/Guides.gd @@ -25,7 +25,7 @@ func _process(delta : float) -> void: else: point0.x -= width * 3 point1.x += width * 3 - if point_in_rectangle(mouse_pos, point0, point1) && Input.is_action_just_pressed("left_mouse"): + if Global.can_draw and Global.has_focus and point_in_rectangle(mouse_pos, point0, point1) and Input.is_action_just_pressed("left_mouse"): if !point_in_rectangle(Global.canvas.current_pixel, Global.canvas.location, Global.canvas.location + Global.canvas.size): has_focus = true Global.has_focus = false