[guidialog] - fix autoclose by moveing the autoclose logic into UpdateVisibility...
authorMemphiz <memphis@machzwo.de>
Thu, 1 Aug 2013 16:10:33 +0000 (18:10 +0200)
committerMemphiz <memphis@machzwo.de>
Thu, 1 Aug 2013 16:10:33 +0000 (18:10 +0200)
xbmc/guilib/GUIDialog.cpp

index 79434c8..83d3b3b 100644 (file)
@@ -142,6 +142,23 @@ void CGUIDialog::UpdateVisibility()
     else
       Close();
   }
+  
+  if (m_autoClosing)
+  { // check if our timer is running
+    if (!m_showStartTime)
+    {
+      if (HasProcessed()) // start timer
+        m_showStartTime = CTimeUtils::GetFrameTime();
+    }
+    else
+    {
+      if (m_showStartTime + m_showDuration < CTimeUtils::GetFrameTime() && !m_closing)
+      {
+        m_bAutoClosed = true;
+        Close();
+      }
+    }
+  }
 }
 
 void CGUIDialog::DoModal_Internal(int iWindowID /*= WINDOW_INVALID */, const CStdString &param /* = "" */)
@@ -230,22 +247,6 @@ void CGUIDialog::Show()
 
 void CGUIDialog::FrameMove()
 {
-  if (m_autoClosing)
-  { // check if our timer is running
-    if (!m_showStartTime)
-    {
-      if (HasProcessed()) // start timer
-        m_showStartTime = CTimeUtils::GetFrameTime();
-    }
-    else
-    {
-      if (m_showStartTime + m_showDuration < CTimeUtils::GetFrameTime() && !m_closing)
-      {
-        m_bAutoClosed = true;
-        Close();
-      }
-    }
-  }
   CGUIWindow::FrameMove();
 }