From d6accd5437d0ff9c27d24f558da11d397fdfc270 Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Thu, 18 Oct 2012 03:13:22 -0700 Subject: [PATCH] MGR: Fix bug which can cause Manager to quit when started in Simple View --- checkin_notes | 6 ++++++ clientgui/sg_TaskPanel.cpp | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/checkin_notes b/checkin_notes index bc118c55bb..e724ee7263 100644 --- a/checkin_notes +++ b/checkin_notes @@ -6247,3 +6247,9 @@ David 17 Oct 2012 html/inc/ forum.inc + +Charlie 18 Oct 2012 + - MGR: Fix bug which can cause Manager to quit when started in Simple View. + + clientgui/ + sg_TaskPanel.cpp diff --git a/clientgui/sg_TaskPanel.cpp b/clientgui/sg_TaskPanel.cpp index 08de3e627a..5ec5511065 100755 --- a/clientgui/sg_TaskPanel.cpp +++ b/clientgui/sg_TaskPanel.cpp @@ -936,10 +936,17 @@ void CSimpleTaskPanel::UpdateTaskSelectionList(bool reskin) { CMainDocument* pDoc = wxGetApp().GetDocument(); CSkinSimple* pSkinSimple = wxGetApp().GetSkinManager()->GetSimple(); + static bool bAlreadyRunning = false; + wxASSERT(pDoc); wxASSERT(pSkinSimple); wxASSERT(wxDynamicCast(pSkinSimple, CSkinSimple)); + if (bAlreadyRunning) { + return; + } + bAlreadyRunning = true; + count = m_TaskSelectionCtrl->GetCount(); // Mark all inactive (this lets us loop only once) for (i=0; iRefresh(); } + + bAlreadyRunning = false; + wxLogTrace(wxT("Function Start/End"), wxT("CSimpleTaskPanel::UpdateTaskSelectionList - Function End")); }