Fix return value of wxPersistentSplitter::RestoreValue().
It used to always return false which didn't allow the code using to decide whether the default splitter position should be used or not. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69582 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
7cab9c4193
commit
eacfac2d5e
@ -47,15 +47,15 @@ public:
|
|||||||
virtual bool Restore()
|
virtual bool Restore()
|
||||||
{
|
{
|
||||||
int pos;
|
int pos;
|
||||||
if ( RestoreValue(wxPERSIST_SPLITTER_POSITION, &pos) )
|
if ( !RestoreValue(wxPERSIST_SPLITTER_POSITION, &pos) )
|
||||||
{
|
return false;
|
||||||
if ( pos == -1 )
|
|
||||||
Get()->Unsplit();
|
|
||||||
else
|
|
||||||
Get()->SetSashPosition(pos);
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
if ( pos == -1 )
|
||||||
|
Get()->Unsplit();
|
||||||
|
else
|
||||||
|
Get()->SetSashPosition(pos);
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual wxString GetKind() const { return wxPERSIST_SPLITTER_KIND; }
|
virtual wxString GetKind() const { return wxPERSIST_SPLITTER_KIND; }
|
||||||
|
Loading…
Reference in New Issue
Block a user