X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1d156af3247c862e51a7c62f569a3fd302052a42..eef2e91ffb62bbf3f61b8d9e718022a020cdeaa2:/include/wx/persist/splitter.h

diff --git a/include/wx/persist/splitter.h b/include/wx/persist/splitter.h
index d80b378a4b..baba7646f0 100644
--- a/include/wx/persist/splitter.h
+++ b/include/wx/persist/splitter.h
@@ -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; }