[Bug]: Token selection cleared the first time switching to a tool
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
Research direction
Start by reproducing the steps in MapTool 1.18.6, then trace how tool switches and layer changes affect token selection. The issue names no files or tests, so locate the relevant tool-selection and token-selection code before deciding where to investigate; done means switching tools and layers no longer clears the selected token.
Written by the indexing model from the issue text.
Description
Describe the Bug
If a token is selected using the Pointer Tool, then the user switches to a different tool, the token selection is cleared. This only happens the first time the users switches to that particular tool, at least since that last time they switched layers. I.e., repeating the process with the same tool will not clear the token selection, but switching to a different tool will clear the token selection. Changing layers seems to reset everything.
To Reproduce
- Open a fresh instance of MapTool
- Drop a token on the map and make sure it is selected.
- Click the "Measure distance along path" tool
- Notice the token gets deselected.
- Switch back to the "Pointer Tool" and select the token again.
- Once again select the "Measure distance along path" tool
- Notice the token is not deselected
- Now select "Drawing Tools" (should switch to the "Delete drawing tool")
- Notice the token is deselected this time.
- Now switch layers and drop a new token, repeating the above steps.
- The same sort of behaviour should be observed.
- Switch back to the original layer, and repeat the above steps.
- Note that we're back to each tool clearing the selection at first.
Expected Behaviour
We should always maintain the token selection. At least some tools need this to work properly, e.g., Fog of War tools for Individual FoW support.
We might not always want to render the selection border for tokens depending on the selected tool. E.g., now that drawings have their own selections, maybe it would be confusing to see the token selection border with the Drawing Tools open. But the token selection itself should be left intact.
Screenshots
No response
MapTool Info
1.18.6
Desktop
Linux Mint 22.3
Additional Context
No response
- Dominant language
- Java
- Stars
- 927
- Forks
- 286
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 94
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from RPTools/maptool
-
[Bug]: An initiative list with no current entry logs an error on every changePossibly taken @dwizard0 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
[Maintenance]: Migrate gradle dependency submission to modern alternativePossibly taken @VelpulaGangavardhan claimed this 18 days ago. Opencode-maintenance
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
RPTools/maptool#6156 · 2 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
code-maintenance
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
Similar issues
-
Cleanup: restore the interrupt flag in AiFailureAnalyzerPossibly taken @Rishankgupta08 claimed this today. Opengood first issue
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
seleniumboot/selenium-boot#258 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
johanhaleby/occurrent#1505 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
FasterXML/jackson-databind#6443 ·
Maintainers usually reply within 1 day
-
Docs: 2 broken linksOpen
Difficulty 1/5 Under an hour Newbie friendliness 78/100
Maintainers usually reply within 1 day