Commit 52e08628 authored by Tomaz  Canabrava's avatar Tomaz Canabrava Committed by Tomaz Canabrava
Browse files

Restore the sizes so the splits don't resize after rearrange

parent 208181d4
......@@ -137,11 +137,15 @@ void ViewSplitter::childEvent(QChildEvent *event)
auto *parent_splitter = qobject_cast<ViewSplitter *>(parentWidget());
if (parent_splitter) {
parent_splitter->m_blockPropagatedDeletion = true;
auto sizes = parent_splitter->sizes();
auto *wdg = widget(0);
const int oldContainerIndex = parent_splitter->indexOf(this);
wdg->setParent(nullptr);
parent_splitter->insertWidget(oldContainerIndex, wdg);
parent_splitter->m_blockPropagatedDeletion = false;
setParent(nullptr);
parent_splitter->setSizes(sizes);
wdg->setFocus();
deleteLater();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment