#3473 closed enhancement (fixed)
[PATCH] deleting a file in the replay menu should not reset the selection
Reported by: | mimo | Owned by: | elexis |
---|---|---|---|
Priority: | Nice to Have | Milestone: | Alpha 20 |
Component: | UI & Simulation | Keywords: | patch |
Cc: | Patch: |
Description
When deleting a file in the replay list, the selection is reset while it would be more practical to keep the previous value (or the previous value - 1 if we deleted the last entry). That would allow an easy removal of a bunch of consecutive entries which is presently quite laborious. The proposed approach is the one used in the load game panel.
Attachments (3)
Change History (12)
comment:1 by , 8 years ago
Keywords: | simple added |
---|
by , 8 years ago
comment:2 by , 8 years ago
Keywords: | review patch added |
---|---|
Milestone: | Backlog → Alpha 20 |
Summary: | deleting a file in the replay menu should not reset the selection → [PATCH] deleting a file in the replay menu should not reset the selection |
comment:3 by , 8 years ago
Keywords: | review removed |
---|
comment:4 by , 8 years ago
- The selected index is restored, but the sorting order is reset on init(), so that one has to be restored as well. I tested it on some orders, where i can get case that it broken?
- When possible, use the name of the GUI object as variable name. what means? create special variable for widget name?
- Ok, will do
comment:5 by , 8 years ago
- Apparently it works if
selected_column
changed, but not whenselected_column_order
changed. For example if I click on "Map Name" once and then delete a replay, it changes the sorting order after deleting, invalidating the selected index too. However if I click on "Map Name" twice and then delete, it works.
I fear this might be a bug in the ordered list itself (not in your patch), but didn't investigate further yet.
For example the olist also has a different sorting bug: It should be sorted according to the date/time by default, but actually it sorts according to the directory name after init.
- Just saying that I didn't encounter the widget-name before. Mostly the following style is used in the GUI:
var replaySelection = Engine.GetGUIObjectByName("replaySelection");
by , 8 years ago
comment:7 by , 8 years ago
Keywords: | review added; simple removed |
---|
by , 8 years ago
comment:9 by , 8 years ago
Keywords: | review removed |
---|---|
Type: | defect → enhancement |
Note:
See TracTickets
for help on using tickets.
Thanks for the patch, but it's not functionally complete yet.
init()
, so that one has to be restored as well. If thats done, #3742 will be trivial to do as well.