Project

General

Profile

Feature #1808 ยป 1808.patch

John Robertson, 12/12/2025 12:18 AM

View differences:

client/gui-qt/gotodlg.cpp
SLOT(item_selected(const QItemSelection &,
const QItemSelection &)));
connect(goto_tab,
&QTableWidget::itemDoubleClicked,
this, &goto_dialog::dbl_click_p);
setLayout(layout);
original_tile = nullptr;
setFocus();
......
}
}
/************************************************************************//**
Double clicked item in worklist table in production tab
****************************************************************************/
void goto_dialog::dbl_click_p(QTableWidgetItem *item)
{
struct city *pdest;
if (item == nullptr) {
return;
}
pdest = game_city_by_number(item->data(Qt::UserRole).toInt());
if (pdest) {
unit_list_iterate(get_units_in_focus(), punit) {
if (unit_can_airlift_to(&(wld.map), punit, pdest)) {
request_unit_airlift(punit, pdest);
} else {
send_goto_tile(punit, pdest->tile);
}
} unit_list_iterate_end;
}
}
/***********************************************************************//**
Slot for hiding dialog
***************************************************************************/
client/gui-qt/gotodlg.h
private slots:
void go_to_city();
void airlift_to();
void dbl_click_p(QTableWidgetItem *item);
void item_selected(const QItemSelection &sl, const QItemSelection &ds);
void checkbox_changed(Qt::CheckState state);
void checkbox_changed_depr(int state);
    (1-1/1)