~widelands-dev/widelands/localizeable_shipnames

« back to all changes in this revision

Viewing changes to src/wui/buildingwindow.cc

MergedĀ lp:~widelands-dev/widelands/bug-1658489-epedition-tab.

Show diffs side-by-side

added added

removed removed

Lines of Context:
159
159
                // Check if this is a port building and if yes show expedition button
160
160
                if (upcast(Widelands::Warehouse const, warehouse, &building_)) {
161
161
                        if (Widelands::PortDock* pd = warehouse->get_portdock()) {
162
 
                                expedition_canceled_subscriber_ =
163
 
                                   Notifications::subscribe<Widelands::NoteExpeditionCanceled>([this](
164
 
                                      const Widelands::NoteExpeditionCanceled&) { update_expedition_button(true); });
165
162
                                expeditionbtn_ =
166
163
                                   new UI::Button(capsbuttons, "start_or_cancel_expedition", 0, 0, 34, 34,
167
164
                                                  g_gr->images().get("images/ui_basic/but4.png"),
170
167
                                expeditionbtn_->sigclicked.connect(
171
168
                                   boost::bind(&BuildingWindow::act_start_or_cancel_expedition, boost::ref(*this)));
172
169
                                capsbuttons->add(expeditionbtn_, UI::Align::kHCenter);
 
170
 
 
171
                                expedition_canceled_subscriber_ =
 
172
                                   Notifications::subscribe<Widelands::NoteExpeditionCanceled>(
 
173
                                      [this, pd](const Widelands::NoteExpeditionCanceled& canceled) {
 
174
                                              // Check this was not just any but our Expedition
 
175
                                              if (canceled.bootstrap == pd->expedition_bootstrap()) {
 
176
                                                      update_expedition_button(true);
 
177
                                              }
 
178
                                           });
173
179
                        }
174
180
                } else if (upcast(const Widelands::ProductionSite, productionsite, &building_)) {
175
181
                        if (!is_a(Widelands::MilitarySite, productionsite)) {