The Edit box in the Editor's "Map Options" should have a "save" and "cancel" button to exit this window

Bug #814500 reported by Astuur
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Wishlist
Unassigned

Bug Description

There is currently no way to cancel modifications to these data, since they seem to get stored immediately.
Closing this window by RMB (now the only way to exit) should work like "cancel".
and to save the modifications, there should be an additional "save" button.
Also it may be good to resize the window (larger!) since most map titles exceed the available space.

Tags: editor ui

Related branches

Revision history for this message
Astuur (wolfsteinmetz) wrote :
Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Thanks for adding tags and screenshot :)

Sounds like a reasonable request to me. Not sure how much work it will take to change the current behaviour which always saves, but it shouldn't be impossible.

A (really minor) concern is how this affects consistency with other windows, since they will be default store the changes you do when you close it by rightclicking. Then again most windows I can think of wouldn't fit a save/cancel scenario like this. And I don't think it really matters if the game and editor behaves slightly different as long as they are internally consistent.

I am assigning this for build17 as I know SirVer is working on the editor for this cycle. (Feel free to reassign to later, though)

Changed in widelands:
importance: Undecided → Wishlist
milestone: none → build17-rc1
status: New → Confirmed
Revision history for this message
SirVer (sirver) wrote :

reassigned to later :)

Changed in widelands:
milestone: build17-rc1 → none
Revision history for this message
SirVer (sirver) wrote :

Setting to incomplete for bug sweeping.

Changed in widelands:
status: Confirmed → Incomplete
Revision history for this message
wl-zocker (wl-zocker) wrote :

The whole map options window should be bigger to provide enough space for the map name and the description.
The size of the edit box of the map name is adjusted to the length of the translation of "Map name" (the longer the translation is, the smaller is the edit box). I think this is basically no problem when the window is wider. (Question: What happens when the translation is longer than the window's width?).
Regarding the save/cancel issue: All other windows save the data when closed with the RMB (there is no other way), e.g. economy settings or the max fill indicator and priority for input wares in buildings. While I do not see a problem here, it feels a bit odd to close a window with a text field and not knowing whether the changes have been saved. The only other window with a text field is the save dialog (both in the game and in the editor), where nothing happens when closed with the RMB.
I therefore suggest the following: It should not be possible to close any window where text is entered (map options, save dialog) with the RMB; they should have a save and a cancel button. All other windows should keep their current behavior (save and close with the RMB, no possibility to cancel). This would keep the system as consistent as possible while it offers to undo bigger changes (and it avoids the odd feeling I have).

Revision history for this message
Hans Joachim Desserud (hjd) wrote :

>Question: What happens when the translation is longer than the window's width?

GunChleoc would probably know this.

>It should not be possible to close any window where text is entered (map options, save dialog) with the RMB; they should have a save and a cancel button.

I agree with the latter part, not so sure about the first. If you look at the rule of least surprise, I would say not being able to close these specific windows via RMB is more surprising than the content not being stored. If we disable the RMB functionality we need to somehow signal or provide feedback why they cannot be closed (flash the textfields or something).

I'm a bit torn though, because to get really consistent behaviour we should add "save" buttons to all the other dialogs and cancel changes on close via RMB. That would mean just adding an extra step to achieve what you want which would be seen as another hoop to jump through for players though, so it's a bad idea though.

>The only other window with a text field is the save dialog (both in the game and in the editor), where nothing happens when closed with the RMB.

I think it would be better to reuse the behaviour from this dialog. An equivalent would be the "Ok/cancel" dialogs you get in an operating system. Clicking ok will perform some action, while cancel will abort it. These dialog windows also has a small X in the title bar to close the window which will be interpreted as if the user clicked cancel.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for widelands because there has been no activity for 60 days.]

Changed in widelands:
status: Incomplete → Expired
Revision history for this message
SirVer (sirver) wrote :

I agree to this. I always click on the "Set Map Origin" button which does not much good :).

Changed in widelands:
status: Expired → Confirmed
Revision history for this message
GunChleoc (gunchleoc) wrote :

>>Question: What happens when the translation is longer than the window's width?
>
>GunChleoc would probably know this.

I haven't checked this particular case, but expected behaviour would be truncation - if the text is longer than the window, the rest of the text is not shown.

We should rearrange all the input fields below their title fields, or simply make the window a lot wider.

Also, The description doesn't have a title field.

We might also want to separate the editable elements from the elements that just display information, like e.g. the number of players.

GunChleoc (gunchleoc)
Changed in widelands:
status: Confirmed → In Progress
assignee: nobody → GunChleoc (gunchleoc)
milestone: none → build19-rc1
GunChleoc (gunchleoc)
Changed in widelands:
status: In Progress → Fix Committed
GunChleoc (gunchleoc)
Changed in widelands:
assignee: GunChleoc (gunchleoc) → nobody
GunChleoc (gunchleoc)
Changed in widelands:
status: Fix Committed → Fix Released
Revision history for this message
GunChleoc (gunchleoc) wrote :

Fixed in build19-rc1.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.