All pastes #1636685 Raw Edit

Stuff

public text v1 · immutable
#1636685 ·published 2009-10-22 05:55 UTC
rendered paste body
Index: libs/libmythui/mythmainwindow.cpp
===================================================================
--- libs/libmythui/mythmainwindow.cpp	(revision 22561)
+++ libs/libmythui/mythmainwindow.cpp	(working copy)
@@ -583,10 +583,15 @@
 
     if (!redraw)
     {
+        for (it = d->stackList.begin(); it != d->stackList.end(); ++it)
+            (*it)->ScheduleInit();
         return;
     }
 
     d->paintwin->update(d->repaintRegion);
+
+    for (it = d->stackList.begin(); it != d->stackList.end(); ++it)
+        (*it)->ScheduleInit();
 }
 
 void MythMainWindow::drawScreen(void)
Index: libs/libmythui/mythscreenstack.h
===================================================================
--- libs/libmythui/mythscreenstack.h	(revision 22561)
+++ libs/libmythui/mythscreenstack.h	(working copy)
@@ -28,6 +28,7 @@
     MythScreenType *GetTopScreen(void) const;
 
     void GetDrawOrder(QVector<MythScreenType *> &screens);
+    void ScheduleInit(void);
     int TotalScreens() const;
 
     void DisableEffects(void) { m_DoTransitions = false; }
Index: libs/libmythui/mythscreenstack.cpp
===================================================================
--- libs/libmythui/mythscreenstack.cpp	(revision 22561)
+++ libs/libmythui/mythscreenstack.cpp	(working copy)
@@ -170,8 +170,8 @@
 void MythScreenStack::GetDrawOrder(QVector<MythScreenType *> &screens)
 {
     // make sure Init() is called outside the paintEvent
-    if (m_DoInit && m_topScreen)
-        QTimer::singleShot(100, this, SLOT(doInit()));
+//    if (m_DoInit && m_topScreen)
+//        QTimer::singleShot(100, this, SLOT(doInit()));
 
     if (m_InNewTransition)
         CheckNewFadeTransition();
@@ -180,6 +180,13 @@
     screens = m_DrawOrder;
 }
 
+void MythScreenStack::ScheduleInit(void)
+{
+    // make sure Init() is called outside the paintEvent
+    if (m_DoInit && m_topScreen)
+        QTimer::singleShot(100, this, SLOT(doInit()));
+}
+
 void MythScreenStack::doInit(void)
 {
     if (m_DoInit && m_topScreen)