Merge lp:~widelands-dev/widelands/bug-1841471-close-dropdowns-with-parent-windows into lp:widelands

Proposed by GunChleoc
Status: Work in progress
Proposed branch: lp:~widelands-dev/widelands/bug-1841471-close-dropdowns-with-parent-windows
Merge into: lp:widelands
Diff against target: 42 lines (+4/-6)
3 files modified
src/editor/ui_menus/player_menu.h (+0/-2)
src/ui_basic/dropdown.cc (+2/-3)
src/ui_basic/unique_window.cc (+2/-1)
To merge this branch: bzr merge lp:~widelands-dev/widelands/bug-1841471-close-dropdowns-with-parent-windows
Reviewer Review Type Date Requested Status
Widelands Developers Pending
Review via email: mp+371999@code.launchpad.net

Commit message

Fix deleting of dropdown lists in UniqueWindow and Player Menu.

To post a comment you must log in.
Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 5358. State: errored. Details: https://travis-ci.org/widelands/widelands/builds/578358022.
Appveyor build 5128. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_bug_1841471_close_dropdowns_with_parent_windows-5128.

Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 5358. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/578358022.
Appveyor build 5128. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_bug_1841471_close_dropdowns_with_parent_windows-5128.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/editor/ui_menus/player_menu.h'
--- src/editor/ui_menus/player_menu.h 2019-08-10 16:38:15 +0000
+++ src/editor/ui_menus/player_menu.h 2019-09-08 20:32:09 +0000
@@ -38,8 +38,6 @@
38 EditorPlayerMenu(EditorInteractive&,38 EditorPlayerMenu(EditorInteractive&,
39 EditorSetStartingPosTool& tool,39 EditorSetStartingPosTool& tool,
40 UI::UniqueWindow::Registry&);40 UI::UniqueWindow::Registry&);
41 ~EditorPlayerMenu() override {
42 }
4341
44private:42private:
45 // Container with UI elements to set a player slot's properties43 // Container with UI elements to set a player slot's properties
4644
=== modified file 'src/ui_basic/dropdown.cc'
--- src/ui_basic/dropdown.cc 2019-07-28 11:33:50 +0000
+++ src/ui_basic/dropdown.cc 2019-09-08 20:32:09 +0000
@@ -147,9 +147,8 @@
147147
148BaseDropdown::~BaseDropdown() {148BaseDropdown::~BaseDropdown() {
149 // The list needs to be able to drop outside of windows, so it won't close with the window.149 // The list needs to be able to drop outside of windows, so it won't close with the window.
150 // Deleting here leads to a conflict as to who gets to delete it, so we just leave it.150 // So, we tell it to die.
151 // It will be hidden as soon as the mouse moves away anyway.151 list_->die();
152 // TODO(GunChleoc): Investigate whether we can find a better solution for this
153}152}
154153
155void BaseDropdown::set_height(int height) {154void BaseDropdown::set_height(int height) {
156155
=== modified file 'src/ui_basic/unique_window.cc'
--- src/ui_basic/unique_window.cc 2019-06-01 14:16:25 +0000
+++ src/ui_basic/unique_window.cc 2019-09-08 20:32:09 +0000
@@ -63,7 +63,8 @@
63 window->restore();63 window->restore();
64 opened();64 opened();
65 } else {65 } else {
66 window->die();66 // Delete rather than die() to make dropdown lists behave
67 delete window;
67 }68 }
68 } else {69 } else {
69 open_window();70 open_window();

Subscribers

People subscribed via source and target branches

to status/vote changes: