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