The proposal to merge lp:~widelands-dev/widelands/keep_optr_in_ui into 
lp:widelands has been updated.

Commit Message changed to:

A more principled fix to dangling object pointers in the UI.

The EditorGameBase class already tracks liveliness of MapObjects for us. So 
let's make use of this instead of keeping the state updated through 
Notifications.

Detailed changes:
- Make BuildingWindow use a OPtr<> to never try to access a building that was 
deleted. Call die() whenver this happens.
- Remove BuildingNote::kDeleted. It no longer is necessary, since the UI has 
another method to track livelyness of a building.
- Change BuildingWindow::create_capsbuttons() to not be virtual, because it was 
never used as a virtual function.
- Simplifications and type safety around child classes of BuildingWindow by 
keeping another OPtr<> for the child classes where needed. Also made more 
functions private.

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/keep_optr_in_ui/+merge/334524
-- 
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/keep_optr_in_ui.

_______________________________________________
Mailing list: https://launchpad.net/~widelands-dev
Post to     : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to