Commit f6364451 authored by loh tar's avatar loh tar
Browse files

Try to mimic the old behaviour without option syncWithTabs

...where the final section sizes will be determined by Qt when some member
of the splitter will be shown or hidden.
parent 484e946f
......@@ -776,6 +776,13 @@ void Sidebar::handleCollapse(int pos, int index)
void Sidebar::ownSplitMoved(int pos, int index)
{
QList<int> wsizes = m_ownSplit->sizes();
for (int i = 0; i < tabBarCount(); ++i) {
if (tabBar(i)->isToolActive()) {
tabBar(i)->setSectionSize(wsizes.at(i));
}
}
if (m_syncWithTabs) {
moveSplitter(pos, index);
}
......@@ -897,6 +904,14 @@ void Sidebar::updateSidebar()
m_splitter->setSizes(wsizes);
}
if (!m_syncWithTabs) {
QList<int> wsizes = m_ownSplit->sizes();
for (int i = 0; i < tabBarCount(); ++i) {
wsizes[i] = tabBar(i)->isToolActive() ? tabBar(i)->sectionSize() : 0;
}
m_ownSplit->setSizes(wsizes);
}
// Ensure we are visible
m_ownSplit->show();
}
......
Supports Markdown
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