Commit 68d91795 authored by Alfonso Murolo's avatar Alfonso Murolo Committed by Tomaz Canabrava
Browse files

ViewSplitter will now consistently create even-spaced splits

ViewSplitter was creating widgets of inconsistent sizes after adding/removing them in Konsole.
This change forces the active splitter to always be updated with the appropriate even-spacing size for the widgets.
As a drawback, manual changes to sizes will be overwritten when a new widget is added if no new splitter needs to be instantiated.

BUG: 447074
parent 651ebc2c
Pipeline #115077 passed with stage
in 1 minute and 54 seconds
......@@ -110,8 +110,10 @@ void ViewSplitter::addTerminalDisplay(TerminalDisplay *terminalDisplay, Qt::Orie
if (splitter->count() < 2) {
splitter->insertWidget(behavior == AddBehavior::AddBefore ? currentIndex : currentIndex + 1, terminalDisplay);
} else if (containerOrientation == splitter->orientation()) {
splitter->insertWidget(currentIndex, terminalDisplay);
} else {
QList<int> sizes = splitter->sizes();
auto newSplitter = new ViewSplitter();
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