Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tilemap selection tool: right click doesn't erase the selection #81933

Closed
ershn opened this issue Sep 19, 2023 · 11 comments
Closed

Tilemap selection tool: right click doesn't erase the selection #81933

ershn opened this issue Sep 19, 2023 · 11 comments

Comments

@ershn
Copy link
Contributor

ershn commented Sep 19, 2023

Godot version

v4.1.1.stable.mono.official [bd6af8e]

System information

Godot v4.1.1.stable.mono - Windows 10.0.19045 - Vulkan (Forward+) - dedicated Radeon RX 580 Series (Advanced Micro Devices, Inc.; 31.0.21029.1006) - AMD Ryzen 7 2700X Eight-Core Processor (16 Threads)

Issue description

Problem

The tilemap documentation states that with the selection tool, right clicking a selection will erase it.
However nothing happens when doing so.

https://docs.godotengine.org/en/stable/tutorials/2d/using_tilemaps.html#selection

While in Selection mode, you can't place new tiles, but you can still erase tiles by right-clicking after making a selection. The whole selection will be erased, regardless of where you click in the selection.

Expectation

Right clicking a selection with the tilemap selection tool removes all the selected tiles from the tilemap.

Demo

bug_reproduction

Steps to reproduce

  1. create a tilemap node
  2. create a tileset with a single atlas, import a texture
  3. paint some tiles in the 2d editor
  4. select the tiles with the tilemap selection tool
  5. try to remove the tiles by right clicking the selection

Minimal reproduction project

Bug.zip

@RoyBerube
Copy link
Contributor

Tested on latest experimental, Win10, on a tilemap:

LMB and RMB seem to be doing the same thing. Shift-RMB will add to the selection the same as shift-LMB. Dragging with RMB or LMB act the same - selection is dragged to a new position.

RMB does not delete.

@Minoxs
Copy link

Minoxs commented Sep 20, 2023

I took a look at it and indeed both LMB and RMB are treated in the same exact way. I'll work on a PR fixing this.

Also in the docs it says:

To append to the current selection, hold Shift then select a tile. To remove from the current selection, hold Ctrl then select a tile.

But from my experience only Shift+CTRL+LMB will remove the selection. Is that expected? and should RMB select tiles at all?

@groud
Copy link
Member

groud commented Sep 20, 2023

Right clicking a selection with the tilemap selection tool removes all the selected tiles from the tilemap.

I think this behavior would be a bit weird TBH. I think the docs are simply wrong here.

@ershn
Copy link
Contributor Author

ershn commented Sep 20, 2023

I agree that it's probably not the most intuitive feature there is.
I was a bit surprised when I read about it at first too.

Do you want me to file a bug on the documentation repository then ?

@ershn
Copy link
Contributor Author

ershn commented Sep 20, 2023

@Minoxs

To append to the current selection, hold Shift then select a tile. To remove from the current selection, hold Ctrl then select a tile.

But from my experience only Shift+CTRL+LMB will remove the selection. Is that expected?

I think this is fixed by #81925

@Minoxs
Copy link

Minoxs commented Sep 20, 2023

I agree that it's weird that the selection tool would delete tiles with right click. Selecting tiles and pressing delete already does that, and it's a lot more intuitive. That's probably what should be in the docs.

@abelbascu
Copy link

abelbascu commented Sep 23, 2023

@ershn @Minoxs please be aware that right-click is perfect for users on a laptop that may be using the touchpad. Being forced to use the touchpad and pressing the Supr key to remove a tile would require the user to move one hand constantly from the touchpad to the Supr key. Not very ergonomic as you normally need to lay down both hands on the touchpad to move cursor and click.

I am just a regular user and pretty new to Godot so I don't know what's the process to raise, validate and test change requirements (as changing the right-click to Supr is not a bug but a CR). I am a bit concerned if this type of CR makes it to production without enough community consensus. In this case, if you want to change the erase key, imo users should be able to set up what key they want to use for erasing tiles instead,

@ershn
Copy link
Contributor Author

ershn commented Sep 24, 2023

@abelbascu I'm not sure I understand your concerns.

  • Right now left click and right click have the same effect for the tilemap selection tool, but the documentation states otherwise. This issue is about fixing that inconsistency (either by fixing the code or the documentation, probably the documentation).
  • You can already delete tiles with the Del key after selecting them. This issue won't change that.
  • You can delete tiles with all other tilemap tools with right clicks already (brush, line, rectangle, bucket). So you are not required to use the Del key to delete tiles.

@abelbascu
Copy link

@ershn my bad, you were talking about the Select tile option and I thought you referred to the Draw option, where I can right-click and hold on the touchpad of my laptop to erase any tiles, which is very convenient for laptop users.

Apologies, fairly new yet to Godot!

@ershn
Copy link
Contributor Author

ershn commented Sep 25, 2023

I opened a PR on the documentation repository that removes the corresponding documentation.

godotengine/godot-docs#8046

@mhilbrunner
Copy link
Member

Fixed on the docs side by godotengine/godot-docs#8046. Thanks for both reporting the issue and fixing it! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants