Fixed display of drop overlay

This commit is contained in:
Uwe Kindler
2017-03-27 13:18:16 +02:00
parent 1b1c636107
commit c5ea5c80b1
5 changed files with 53 additions and 60 deletions

View File

@@ -124,7 +124,8 @@ struct DockContainerWidgetPrivate
/**
* Restore state of child nodes.
* \param[in] Stream The data stream that contains the serialized state
* \param[out] CreatedWidget The widget created from parsed data
* \param[out] CreatedWidget The widget created from parsed data or 0 if
* the parsed widget was an empty splitter
* \param[in] Testing If Testing is true, only the stream data is
* parsed without modifiying anything.
*/
@@ -828,10 +829,18 @@ bool CDockContainerWidget::restoreState(QDataStream& stream, bool Testing)
return true;
}
// If the root splitter is empty, rostoreChildNodes returns a 0 pointer
// and we need to create a new empty root splitter
if (!NewRootSplitter)
{
NewRootSplitter = internal::newSplitter(Qt::Horizontal);
}
d->Layout->replaceWidget(d->RootSplitter, NewRootSplitter);
QSplitter* OldRoot = d->RootSplitter;
d->RootSplitter = dynamic_cast<QSplitter*>(NewRootSplitter);
OldRoot->deleteLater();
return true;
}