EvtMainFrame: Add some extra safety, just in case.
This commit is contained in:
parent
0ce8046728
commit
3cb897ccda
1 changed files with 3 additions and 1 deletions
|
@ -691,6 +691,8 @@ void EvtMainFrame::updateProfileStats() {
|
||||||
_muscularConstruction->SetValueFromInt(current_profile->getMuscularConstruction());
|
_muscularConstruction->SetValueFromInt(current_profile->getMuscularConstruction());
|
||||||
_mineralExoskeletology->SetValueFromInt(current_profile->getMineralExoskeletology());
|
_mineralExoskeletology->SetValueFromInt(current_profile->getMineralExoskeletology());
|
||||||
_carbonizedSkin->SetValueFromInt(current_profile->getCarbonizedSkin());
|
_carbonizedSkin->SetValueFromInt(current_profile->getCarbonizedSkin());
|
||||||
|
|
||||||
|
updateCommandsState();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EvtMainFrame::initStoryProgressMenu() {
|
void EvtMainFrame::initStoryProgressMenu() {
|
||||||
|
@ -817,7 +819,7 @@ void EvtMainFrame::updateCommandsState() {
|
||||||
wxPropertyGridConstIterator it = _researchInventoryPropGrid->GetIterator(wxPG_ITERATE_NORMAL);
|
wxPropertyGridConstIterator it = _researchInventoryPropGrid->GetIterator(wxPG_ITERATE_NORMAL);
|
||||||
while(!it.AtEnd()) {
|
while(!it.AtEnd()) {
|
||||||
if(it.GetProperty()->IsCategory() == false) {
|
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();
|
it.Next();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue