EvtMainFrame: make the PMC rename button safer.

This commit is contained in:
Guillaume Jacquemin 2021-05-11 14:52:52 +02:00
parent 640f378357
commit 3c8e82da96

View file

@ -626,6 +626,8 @@ void EvtMainFrame::updateCommandsState() {
GameState game_state = _mbManager.gameState(); GameState game_state = _mbManager.gameState();
MassState mass_state = _massManager->massState(selection); MassState mass_state = _massManager->massState(selection);
_companyRenameButton->Enable(_unsafeMode == true || game_state == GameState::NotRunning);
_importButton->Enable(selection != -1 && staged_selection != -1 && (_unsafeMode == true || game_state == GameState::NotRunning)); _importButton->Enable(selection != -1 && staged_selection != -1 && (_unsafeMode == true || game_state == GameState::NotRunning));
_exportButton->Enable(selection != -1); _exportButton->Enable(selection != -1);
_moveButton->Enable(selection != -1 && (_unsafeMode == true || game_state == GameState::NotRunning) && mass_state == MassState::Valid); _moveButton->Enable(selection != -1 && (_unsafeMode == true || game_state == GameState::NotRunning) && mass_state == MassState::Valid);