Commit c53883f6 authored by Alexander Schuch's avatar Alexander Schuch
Browse files

Disable planet owner combo box if required.

Changing the owner of a planet in new game dialogue currently crashes if
the selected planet moves off the map due to a resize. Steps to reproduce
are in the bug report. This patch makes owner combo box follow same rules
for enabling as production and kill percentage.

Patched by Michael Reeves.
This is implemented in Konquest 2.1.

BUG: 328236
FIXED-IN: 4.11
REVIEW: 114232
(cherry picked from commit c937b221)
(cherry picked from commit 285d5ea5)
parent d56662eb
......@@ -480,12 +480,14 @@ NewGameDlg::slotUpdateSelection(const Coordinate &coord)
{
Sector *sector = m_game->map()->sector(coord);
if (!sector) {
m_w->OwnerCB->setEnabled(false);
m_w->KillPercentageSB->setEnabled(false);
m_w->ProductionSB->setEnabled(false);
return;
}
bool hasPlanet = sector->hasPlanet();
m_w->OwnerCB->setEnabled(hasPlanet);
m_w->KillPercentageSB->setEnabled(hasPlanet);
m_w->ProductionSB->setEnabled(hasPlanet);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment