X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fcommon%2Ftimers.cpp;h=4ba3e94874008a724e97654d3bc67343a50ca534;hb=249f14d0f23d5bd06df67d3cdb864357aa652cc3;hp=01849530fc4397fa73136962d21f7d32c49e1955;hpb=3c0a57e91bb919dd1c7bd0536278fb7753b8a77a;p=xestiaab%2F.git diff --git a/source/common/timers.cpp b/source/common/timers.cpp index 0184953..4ba3e94 100644 --- a/source/common/timers.cpp +++ b/source/common/timers.cpp @@ -297,7 +297,7 @@ void wxActListProcTimer::Notify(){ ueventdata->ItemLabel = _("Stopped"); wxPostEvent(static_cast(ActMgrPtr), uevent); - iter->second = 5; + iter->second = 6; } else if (iter->second == 4){ @@ -309,19 +309,24 @@ void wxActListProcTimer::Notify(){ } + // Delete the connection object if finished. + + if (iter->second > 4){ + + std::map::iterator ConnObjectIter = ActListConnObjectsPtr->find(iter->first); + + delete ConnObjectIter->second; + ConnObjectIter->second = nullptr; + + } + // Insert a finish date. wxDateTime adt; adt = adt.Now(); ActListFinDTPtr->insert(std::make_pair(iter->first, adt)); - - // Delete the connection object. - - std::map::iterator ConnObject = ActListConnPtr->find(iter->first); - delete ConnObject->second; - ConnObject->second = NULL; - + } if (ClearupProcessed == TRUE){ @@ -351,7 +356,7 @@ void wxActListProcTimer::SetupPointers(std::map *ActList, std::map *ActListDetail, bool *TasksActive, wxListCtrl *lstActivity, wxStaticText *lblDetails, wxGauge *GauProgress, void *ActMgr, wxActTimer *ActTimer, wxActProcessTimer *ActProcessTimer, - std::map *ActListFinDT, std::map *ActListConn){ + std::map *ActListFinDT, std::map *ActListConnObjects){ // Setup the pointers for wxActListProcTimer. @@ -366,7 +371,7 @@ void wxActListProcTimer::SetupPointers(std::map *ActList, std::map