OSDN Git Service

Values need to be cleared when switching engines
authorryan <>
Mon, 12 Sep 2016 03:09:24 +0000 (03:09 +0000)
committerryan <>
Mon, 12 Sep 2016 03:09:24 +0000 (03:09 +0000)
src/frontend/actionviewer.cpp
src/frontend/peoplemanager.cpp

index 79d5837..d638b25 100644 (file)
@@ -148,7 +148,14 @@ void ActionViewer::Loop()
        if (Simcore->GetActionCount() != lastcount)
        {
                lastcount = Simcore->GetActionCount();
+
+               //clear values
                ActionList->Clear();
+               tName->Clear();
+               tParentName->Clear();
+               tType->Clear();
+               tCommand->Clear();
+               tParameters->Clear();
 
                for (int i = 0; i < Simcore->GetActionCount(); i++)
                        ActionList->Append(ToString(i + 1) + wxT(" - ") + Simcore->GetAction(i)->GetName());
index 9e1c94f..92f1e48 100644 (file)
@@ -312,6 +312,17 @@ void PeopleManager::BuildList(bool restore_selection)
                        else
                                PersonList->SetSelection(old_selection);
                }
+               else
+               {
+                       //clear values
+                       tName->Clear();
+                       tRouteActive->Clear();
+                       tFloor->Clear();
+                       tDestination->Clear();
+                       tStatus->Clear();
+                       chkRandom->SetValue(false);
+                       chkService->SetValue(false);
+               }
        }
 }