GunChleoc has proposed merging
lp:~widelands-dev/widelands/bug-1669103-no-automatic-dismantlesitewindow into
lp:widelands.
Commit message:
Close the building window when dismantling a building.
Requested reviews:
Widelands Developers (widelands-dev)
Related bugs:
Bug #1669103 in widelands: "Confirming Dismantle building opens dismantle
site window"
https://bugs.launchpad.net/widelands/+bug/1669103
For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1669103-no-automatic-dismantlesitewindow/+merge/354179
--
Your team Widelands Developers is requested to review the proposed merge of
lp:~widelands-dev/widelands/bug-1669103-no-automatic-dismantlesitewindow into
lp:widelands.
=== modified file 'src/logic/player.cc'
--- src/logic/player.cc 2018-07-26 11:24:49 +0000
+++ src/logic/player.cc 2018-09-03 10:38:29 +0000
@@ -743,8 +743,10 @@
workers = building->get_workers();
}
- // Register whether the window was open
- Notifications::publish(NoteBuilding(building->serial(), NoteBuilding::Action::kStartWarp));
+ if (index_of_new_building != INVALID_INDEX) {
+ // For enhancing, register whether the window was open
+ Notifications::publish(NoteBuilding(building->serial(), NoteBuilding::Action::kStartWarp));
+ }
building->remove(egbase()); // no fire or stuff
// Hereafter the old building does not exist and building is a dangling
// pointer.
_______________________________________________
Mailing list: https://launchpad.net/~widelands-dev
Post to : [email protected]
Unsubscribe : https://launchpad.net/~widelands-dev
More help : https://help.launchpad.net/ListHelp