X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d6397a9f35045cfb65cbbf59cd519559963c915e..9869c26285dc51d13607cddaa04f65ce983653a5:/include/wx/persist/splitter.h diff --git a/include/wx/persist/splitter.h b/include/wx/persist/splitter.h index d80b378a4b..d8369c3783 100644 --- a/include/wx/persist/splitter.h +++ b/include/wx/persist/splitter.h @@ -3,7 +3,6 @@ // Purpose: Persistence support for wxSplitterWindow. // Author: Vadim Zeitlin // Created: 2011-08-31 -// RCS-ID: $Id: wxhead.h,v 1.12 2010-04-22 12:44:51 zeitlin Exp $ // Copyright: (c) 2011 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -47,15 +46,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; }