]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/persist/splitter.h
support SDK < 10.6, fixes #14902
[wxWidgets.git] / include / wx / persist / splitter.h
index d80b378a4bf67e62acb4b70390a8657efd39f1c4..baba7646f07820781e5176e93946841551772dcd 100644 (file)
@@ -47,15 +47,15 @@ public:
     virtual bool Restore()
     {
         int pos;
-        if ( RestoreValue(wxPERSIST_SPLITTER_POSITION, &pos) )
-        {
-            if ( pos == -1 )
-                Get()->Unsplit();
-            else
-                Get()->SetSashPosition(pos);
-        }
-
-        return false;
+        if ( !RestoreValue(wxPERSIST_SPLITTER_POSITION, &pos) )
+            return false;
+
+        if ( pos == -1 )
+            Get()->Unsplit();
+        else
+            Get()->SetSashPosition(pos);
+
+        return true;
     }
 
     virtual wxString GetKind() const { return wxPERSIST_SPLITTER_KIND; }