Fix ghosts being left behind when reopening Terraform window with a keyboard shortcut#2974
Fix ghosts being left behind when reopening Terraform window with a keyboard shortcut#2974LeeSpork wants to merge 2 commits intoOpenLoco:masterfrom
Conversation
| PlantTrees::removeTreeGhost(); | ||
| BuildWalls::removeWallGhost(); | ||
|
|
||
| window->callOnMouseUp(Common::widx::tab_plant_trees); |
There was a problem hiding this comment.
Calling window->callOnMouseUp here seems redundant. The callers of open() already call this themselves! I didn't feel brave enough to remove it in this PR though.
|
I think we could just add a tool abort that removes the ghosts. |
I guess one could write abort functions for each terraform tool, though I believe the position where I added lines in Terraform::open() is the only place where you could reasonably detect the tool being "aborted" in this way. i.e. in place of lines +2891 to +2892 in this PR, I think you would probably have |
A tool abort is automatically called on tab change that's why i think it would be simpler |
I agree this would be the way to go for this. |
|
#3307 supersedes this |
Fixes #2741
I moved the open() function because: