[dasher: 3/21] Fix assertion failure when using ScheduleZoom with many modal messages
- From: Patrick Welche <pwelche src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dasher: 3/21] Fix assertion failure when using ScheduleZoom with many modal messages
- Date: Thu, 14 Jul 2011 17:31:24 +0000 (UTC)
commit a6e801c5340135823abf85b0dc9319bd1931155b
Author: Alan Lawrence <acl33 inf phy cam ac uk>
Date: Fri Jul 8 19:02:50 2011 +0100
Fix assertion failure when using ScheduleZoom with many modal messages
If more than one screenful of messages, need to ClearScheduledSteps when
displaying a new screenful
Src/DasherCore/DashIntfScreenMsgs.cpp | 8 ++++++--
Src/DasherCore/DasherInterfaceBase.cpp | 6 +-----
Src/DasherCore/DasherInterfaceBase.h | 2 +-
3 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/Src/DasherCore/DashIntfScreenMsgs.cpp b/Src/DasherCore/DashIntfScreenMsgs.cpp
index 125f928..b75e145 100644
--- a/Src/DasherCore/DashIntfScreenMsgs.cpp
+++ b/Src/DasherCore/DashIntfScreenMsgs.cpp
@@ -88,9 +88,13 @@ void CDashIntfScreenMsgs::Unpause(unsigned long lTime) {
//Message has been displayed; delete it
delete m_dqModalMessages.front().first; //the label
m_dqModalMessages.pop_front();
- } else return; //there are more, not-yet displayed, modal messages!
- //These should be after any that were displayed (which have now been erased), so:
+ } else {
+ //there are more, not-yet displayed, modal messages!
+ //These should be after any that were displayed (which have now been erased), so
// do not unpause; next frame will render more messages instead.
+ m_pDasherModel->ClearScheduledSteps();
+ return;
+ }
}
CDasherInterfaceBase::Unpause(lTime);
}
diff --git a/Src/DasherCore/DasherInterfaceBase.cpp b/Src/DasherCore/DasherInterfaceBase.cpp
index c6a2d3d..b054572 100644
--- a/Src/DasherCore/DasherInterfaceBase.cpp
+++ b/Src/DasherCore/DasherInterfaceBase.cpp
@@ -86,12 +86,11 @@ static char THIS_FILE[] = __FILE__;
#endif
#endif
-CDasherInterfaceBase::CDasherInterfaceBase(CSettingsStore *pSettingsStore) : CSettingsUser(pSettingsStore), m_pSettingsStore(pSettingsStore), m_pLockLabel(NULL) {
+CDasherInterfaceBase::CDasherInterfaceBase(CSettingsStore *pSettingsStore) : CSettingsUser(pSettingsStore), m_pSettingsStore(pSettingsStore), m_pDasherModel(new CDasherModel(this,this)), m_pLockLabel(NULL) {
pSettingsStore->Register(this, true);
// Ensure that pointers to 'owned' objects are set to NULL.
- m_pDasherModel = NULL;
m_DasherScreen = NULL;
m_pDasherView = NULL;
m_pInput = NULL;
@@ -126,9 +125,6 @@ void CDasherInterfaceBase::Realize(unsigned long ulTime) {
srand(ulTime);
- //create the model... (no nodes just yet)
- m_pDasherModel = new CDasherModel(this, this);
-
SetupUI();
SetupPaths();
diff --git a/Src/DasherCore/DasherInterfaceBase.h b/Src/DasherCore/DasherInterfaceBase.h
index 467bf98..96494a7 100644
--- a/Src/DasherCore/DasherInterfaceBase.h
+++ b/Src/DasherCore/DasherInterfaceBase.h
@@ -423,6 +423,7 @@ protected:
CDasherScreen *m_DasherScreen;
+ CDasherModel * const m_pDasherModel;
private:
@@ -506,7 +507,6 @@ protected:
/// @name Child components
/// Various objects which are 'owned' by the core.
/// @{
- CDasherModel *m_pDasherModel;
CDasherView *m_pDasherView;
CDasherInput *m_pInput;
CInputFilter* m_pInputFilter;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]