From 3cb897ccda3f10a54aad339e6442244a502ba72a Mon Sep 17 00:00:00 2001 From: William JCM Date: Wed, 12 May 2021 20:39:48 +0200 Subject: [PATCH] EvtMainFrame: Add some extra safety, just in case. --- GUI/EvtMainFrame.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/GUI/EvtMainFrame.cpp b/GUI/EvtMainFrame.cpp index 9338126..f79d622 100644 --- a/GUI/EvtMainFrame.cpp +++ b/GUI/EvtMainFrame.cpp @@ -691,6 +691,8 @@ void EvtMainFrame::updateProfileStats() { _muscularConstruction->SetValueFromInt(current_profile->getMuscularConstruction()); _mineralExoskeletology->SetValueFromInt(current_profile->getMineralExoskeletology()); _carbonizedSkin->SetValueFromInt(current_profile->getCarbonizedSkin()); + + updateCommandsState(); } void EvtMainFrame::initStoryProgressMenu() { @@ -817,7 +819,7 @@ void EvtMainFrame::updateCommandsState() { wxPropertyGridConstIterator it = _researchInventoryPropGrid->GetIterator(wxPG_ITERATE_NORMAL); while(!it.AtEnd()) { if(it.GetProperty()->IsCategory() == false) { - it.GetProperty()->Enable(_unsafeMode == true || game_state == GameState::NotRunning); + it.GetProperty()->Enable(it.GetProperty()->GetValue().GetInteger() != -1 && (_unsafeMode == true || game_state == GameState::NotRunning)); } it.Next(); }