Commit c937b221 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
parent a39ffa7c
......@@ -440,12 +440,14 @@ NewGameDlg::slotUpdateSelection(const Coordinate &coord)
{
Sector *selected = m_game->map()->sector(coord);
if (!selected) {
m_w->OwnerCB->setEnabled(false);
m_w->KillPercentageSB->setEnabled(false);
m_w->ProductionSB->setEnabled(false);
return;
}
bool planet = selected->hasPlanet();
m_w->OwnerCB->setEnabled(planet);
m_w->KillPercentageSB->setEnabled(planet);
m_w->ProductionSB->setEnabled(planet);
......
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