X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d6397a9f35045cfb65cbbf59cd519559963c915e..43c42c18d36c703a88b1b7b697bac27fe5608eca:/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; }