Merge lp:~widelands-dev/widelands/bug-1669103-no-automatic-dismantlesitewindow into lp:widelands

Proposed by GunChleoc
Status: Merged
Merged at revision: 8827
Proposed branch: lp:~widelands-dev/widelands/bug-1669103-no-automatic-dismantlesitewindow
Merge into: lp:widelands
Diff against target: 16 lines (+4/-2)
1 file modified
src/logic/player.cc (+4/-2)
To merge this branch: bzr merge lp:~widelands-dev/widelands/bug-1669103-no-automatic-dismantlesitewindow
Reviewer Review Type Date Requested Status
Notabilis diff, testing Approve
Review via email: mp+354179@code.launchpad.net

Commit message

Close the building window when dismantling a building.

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

Continuous integration builds have changed state:

Travis build 3885. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/423896050.
Appveyor build 3683. State: failed. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_bug_1669103_no_automatic_dismantlesitewindow-3683.

Revision history for this message
Notabilis (notabilis27) wrote :

Code is looking good and testing works as intended.

review: Approve (diff, testing)
Revision history for this message
GunChleoc (gunchleoc) wrote :

Thanks for the review :)

@bunnybot merge

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/logic/player.cc'
2--- src/logic/player.cc 2018-07-26 11:24:49 +0000
3+++ src/logic/player.cc 2018-09-12 06:04:18 +0000
4@@ -743,8 +743,10 @@
5 workers = building->get_workers();
6 }
7
8- // Register whether the window was open
9- Notifications::publish(NoteBuilding(building->serial(), NoteBuilding::Action::kStartWarp));
10+ if (index_of_new_building != INVALID_INDEX) {
11+ // For enhancing, register whether the window was open
12+ Notifications::publish(NoteBuilding(building->serial(), NoteBuilding::Action::kStartWarp));
13+ }
14 building->remove(egbase()); // no fire or stuff
15 // Hereafter the old building does not exist and building is a dangling
16 // pointer.

Subscribers

People subscribed via source and target branches

to status/vote changes: