MainFrame: update a button's {dis,en}abled logic.

This commit is contained in:
Guillaume Jacquemin 2021-03-05 14:24:27 +01:00
parent 20c35c8d8e
commit 0b1ecc52f5

View file

@ -649,7 +649,7 @@ void EvtMainFrame::updateCommandsState() {
GameState game_state = _mbManager.gameState();
MassState mass_state = _massManager->massState(selection);
_importButton->Enable(selection != -1 && staged_selection != -1 && game_state != GameState::Running);
_importButton->Enable(selection != -1 && staged_selection != -1 && game_state == GameState::NotRunning);
_exportButton->Enable(selection != -1);
_moveButton->Enable(selection != -1 && game_state == GameState::NotRunning && mass_state == MassState::Valid);
_deleteButton->Enable(selection != -1 && game_state == GameState::NotRunning && mass_state != MassState::Empty);