[2.0.14] Display panel clears unsaved changes when another GUI is opened

Post your bugs and problems so we can fix them.
User avatar
LCStark
Fast Inserter
Fast Inserter
Posts: 192
Joined: Thu Jan 28, 2021 5:04 pm
Contact:

[2.0.14] Display panel clears unsaved changes when another GUI is opened

Post by LCStark »

I'm editing a display panel, adding a few dozen messages to it. After going through a lot of them I don't notice that the "Edit Message" text input box isn't focussed and start typing something beginning with "T", which opens the technology tree. I press "T" again to close the research window, and I find the the "Edit Message" window has closed, but the display panel GUI is still open and all the unsaved changes in it have been removed.





Since the display panel GUI remains open after closing the research screen, I'd expect it to retain all the unsaved changes. Or if possible, prevent opening another GUI and show the unconfirmed changes dialog first.
11-03-2024, 11-54-31.png
11-03-2024, 11-54-31.png (11.41 KiB) Viewed 157 times

But another problem here is the edit message window. Would it be possible to make the text box focussed by default when opening this dialog window? I feel like it not being focussed leads to accidentally opening other menus quite often. It's easy to either not notice the input has no focus or make a mistake while quickly editing a lot of messages. Since that window's prime function is to edit a text message (and the only other function - adding an icon to the rich text edit - is only accessed via a click anyway and doesn't care about focus), I think default focus on the text box would be better here.
Attachments
factorio-current.log
(15.15 KiB) Downloaded 10 times
display_panel.mp4
(8.36 MiB) Downloaded 16 times
jyasutin
Burner Inserter
Burner Inserter
Posts: 7
Joined: Thu Nov 28, 2024 4:43 am
Contact:

Re: [2.0.14] Display panel clears unsaved changes when another GUI is opened

Post by jyasutin »

Can confirm this is still present in 2.0.21; if a dialog has a confirmation window then it should not be trivial to bypass that confirmation window. Furthermore the results are inconsistent depending on what you do due to the fact that the dialog sets some attributes immediately but delays setting other attributes.

To start:

* Place a display panel (no need for a circuit network connection).
* Open the "Display panel" dialog by clicking on the panel.
* Change the icon.
* Change the text.
* Make sure focus is not on any text box.

At this point pressing Esc opens the "Confirmation" dialog. If you agree to discard changes then the icon change persists (as it was applied immediately) but the label changes are discarded. This is surprising to a user who would expect *all* changes made in the dialog to be discarded.

Pressing "t" opens the technology tree; when you close the technology tree the Display panel dialog is still open, the label changes are discarded but the icon change persists.

Pressing Shift-L opens the logistic networks window; when you close that the display panel dialog has closed completely, the icon change persists and the label change is discarded. In general anything that causes Remote view or Blueprint library to open will close the Display panel dialog.

Some windows such as Factoriopedia and Tips and tricks do not cause the edits to be discarded.

The idea of confirming to discard changes is nice but the inconsistencies may baffle newcomers. Other dialogs of similar complexity do not confirm before discarding changes so that may further surprise newcomers.
Post Reply

Return to “Bug Reports”