Fix the bug closing pd when request for updating box is comming.
authorYunchan Cho <yunchan.cho@samsung.com>
Thu, 4 Jul 2013 02:32:48 +0000 (11:32 +0900)
committerYunchan Cho <yunchan.cho@samsung.com>
Thu, 4 Jul 2013 12:22:30 +0000 (21:22 +0900)
[Issue#] N/A
[Problem] when request for updating box is comming on opening pd,
          pd is closed and box is reloaded.
[Cause] this case was not considered when request for updating box is comming.
[Solution] In this case, the request is deffered by closing pd.

Change-Id: Idbf408e81ee2541305cf326780d34495b13a03a7

src/Core/Box.cpp

index 695a2b6..0e46e34 100644 (file)
@@ -230,6 +230,11 @@ bool Box::closePd()
         return false;
     }
 
+    // if box update is requested during pd opening
+    if (m_updateNeeded) {
+        updateInternal();
+    }
+
     SWITCH_BOX_STATE();
     return true;
 }
@@ -240,8 +245,9 @@ bool Box::update(time_t requestTime, std::string& contentInfo)
 
     m_lastUpdateRequestTime = requestTime;
     m_boxInfo->contentInfo = contentInfo;
-    if (m_paused) {
-        // update is dalayed until this box goes to current tab
+    if (m_paused || m_pdBuffer) {
+        // update is dalayed
+        //  until this box goes to current tab or pd is closed
         m_updateNeeded = true;
         return true;
     }