benoitc Messages: 17 Registered: July 2007 Location: Nice (France)
Promising Member
Hi,
Funny, I did the same kind of patch 3 weeks ago.
I updated the Serialize function as well because it was a little bit broken (i.e. the layout was not refreshed if you loaded a size different than the original one).
I added the serialization of a new visibility flag to be able to restart the application with a Splitter that was previously hidden.
void SplitterFrame::Serialize(Stream& s)
{
int version = 1;
bool visible = IsShown();
s / version;
s % size;
if(version > 0)
s % visible;
if(s.IsLoading()) {
Show(visible);
RefreshParentLayout();
}
}