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

Fix selection highlight issue for unordered layer lists set by script #3512

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Oct 24, 2022

  1. Fix selection highlight issue for unordered layer lists set by script

    	- fixes mapeditor#3451 where layer selection highlighting was bugging out if the newly set selection was not ordered by layer ID
    	- this seems to be an event interplay issue with the following sequence:
    		- script sets the layer selection to some array
    		- first step in handling that is to set the currently selected layers to be the full array, triggering LayerView::selectedLayersChanged to select the whole range
    		- second step is to make sure that the mCurrentLayer variable is pointing to an object within that array selection, which in this bad case it is not, so we end up calling setSelectedLayers with one item, triggering LayerView::selectedLayersChanged again with a single item and effectively clearing out the selection we had just highlighted
    	- fix this by doing the second step before the first step
    lhiginbotham committed Oct 24, 2022
    Configuration menu
    Copy the full SHA
    74a3a06 View commit details
    Browse the repository at this point in the history