All pastes #932135 Raw Edit

Untitled

public text v1 · immutable
#932135 ·published 2008-03-07 15:01 UTC
rendered paste body
Index: mythtv/libs/libmythui/mythscreentype.cpp
===================================================================
--- mythtv/libs/libmythui/mythscreentype.cpp    (revision 16409)
+++ mythtv/libs/libmythui/mythscreentype.cpp    (working copy)
@@ -159,6 +159,12 @@
 {
 }

+void MythScreenType::DeleteScreen(void)
+{
+    if (!IsDeleting())
+        m_ScreenStack->PopScreen();
+}
+
 bool MythScreenType::IsDeleting(void)
 {
     return m_IsDeleting;
Index: mythtv/libs/libmythui/mythscreentype.h
===================================================================
--- mythtv/libs/libmythui/mythscreentype.h      (revision 16409)
+++ mythtv/libs/libmythui/mythscreentype.h      (working copy)
@@ -34,6 +34,8 @@
     bool IsDeleting(void);
     void SetDeleting(bool deleting);

+    void DeleteScreen(void);
+
   protected:
     // for the global store..
     MythScreenType(MythUIType *parent, const char *name,
Index: mythtv/libs/libmythui/mythscreenstack.cpp
===================================================================
--- mythtv/libs/libmythui/mythscreenstack.cpp   (revision 16409)
+++ mythtv/libs/libmythui/mythscreenstack.cpp   (working copy)
@@ -78,6 +78,8 @@
     if (!top || top->IsDeleting())
         return;

+    top->SetDeleting(true);
+
     MythMainWindow *mainwindow = GetMythMainWindow();

     qApp->lock();
@@ -86,7 +88,6 @@
     if (allowFade && m_DoTransitions && !mainwindow->IsExitingToMain())
     {
         top->SetFullscreen(false);
-        top->SetDeleting(true);
         m_ToDelete.push_back(top);
         top->AdjustAlpha(1, -kFadeVal);
     }
Index: mythtv/programs/mythfrontend/mythappearance.cpp
===================================================================
--- mythtv/programs/mythfrontend/mythappearance.cpp     (revision 16409)
+++ mythtv/programs/mythfrontend/mythappearance.cpp     (working copy)
@@ -159,7 +159,7 @@
         else if (action == "ESCAPE")
         {
             gContext->removeCurrentLocation();
-            GetMythMainWindow()->GetMainStack()->PopScreen();
+            DeleteScreen();
         }
         else
             handled = false;