Fix editor area/actor deselection bugs#21318
Conversation
ef4ce40 to
f96297e
Compare
270f9e9 to
1f482c3
Compare
|
a bit off topic, but it would be intuitive if selected area can be canceled also with Escape key. Same for Copy/paste brush |
PunkPun
left a comment
There was a problem hiding this comment.
undo does not seem to remove actor selection visual
63d9a57 to
e2f7a07
Compare
|
the history tab seems a bit bugged. If you go to a select action then you are put into the selection panel, instead of being able to move through the rest on history. I dunno what the best way to fix that is. And also all subsequent actions are deleted as the "Cleared Selection" action is added (or is going back to history tab inserting the action?) |
|
I'll check out that History tab bug. Sorry Pun I thought it was in better shape. There's a couple of other code design issues I still want to address too:
|
|
yeah, probably they should be controlled by the default brush |
|
I'll continue working on this but just letting you know I'm happy if you want to back out the editor selection PR until it's fully ready to go. |
184107b to
1844a35
Compare
|
I did the intended code refactor items I mentioned in a previous comment:
I also applied your idea to invoke the SelectionChanged event from the EditorDefaultBrush.Selection setter instead, which is tidier and worked as intended. Two annoyances still remain:
|
7d11c40 to
153fb1b
Compare
|
Added fixes for the last two items mentioned:
Also reintroduced a fix for issue #21314 as per PunkPun's suggested code change. I also added a couple of little fixes for the new area selection info panel (I might look at that in more detail later). I also made the chrome for the editor icon collection use a distinct set instead of reusing the timer and infantry icons as suggested in Discord by Dzierzan: Having a ArtSrc changes are here: OpenRA/ArtSrc#20 |
PunkPun
left a comment
There was a problem hiding this comment.
it looks like icons became off-centred
when I select a resource, it blinks on the last spot where the add resource cursor was rendered. Same with tiles. I wonder if this is a recent regression.
I wonder how other cursors should work. Now when you change cursors you nolonger delete selection. The actor is still selected, and the area select still exists (you can copy paste), but just not rendered while another cursor is equipped. I feel like changing cursor should delete selection.
Perhaps the select tab should act as a button that sets cursor to the default cursor? That way it would still have a function while there's no selection available and would not need to be disabled
e7b438b to
525d3f5
Compare
525d3f5 to
a961adf
Compare
14f0866 to
fb7355a
Compare
|
I've altered the area select behavior now so that the selection is kept when selecting a different brush. I know this is contrary to my earlier comment, but after playing around with it, I think it's better behavior. Right clicking will not clear the selection. This matches actor selection behavior. Undo/redo actions will no longer switch tabs. This required a change to IEditorAction.Do() to pass a I'm much happier with how it all fits together now. |
PunkPun
left a comment
There was a problem hiding this comment.
if you copy-paste with no filters on, the undo action won't undo the removed actors
fb7355a to
1463118
Compare
|
I reverted the change to the |





There are two state issues with selection and deselection in the editor after the new changes.
This PR fixes these issues.
ActorEditLogicneeded some logic to fire in a handler forDefaultBrush.SelectionChangedinstead ofTick().Also added a missing copyright header.
Also fixes #21314