// 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 <vadim@wxwidgets.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
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; }