Fix New tab behavior
ClosedPublic

Authored by thsurrel on Apr 26 2019, 8:55 AM.

Details

Summary

Fix the regression about the placement of a new tab:
it is now added either at the end, or next to the
current tab depending on the setting.

BUG: 406409

Test Plan

In Konsole settings, select 'Put new tab after the
current tab' for the New tab behavior setting.
Open some new tabs and check they are opened at the
proper position.

Diff Detail

Repository
R319 Konsole
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
thsurrel created this revision.Apr 26 2019, 8:55 AM
Restricted Application added a project: Konsole. · View Herald TranscriptApr 26 2019, 8:55 AM
Restricted Application added a subscriber: konsole-devel. · View Herald Transcript
thsurrel requested review of this revision.Apr 26 2019, 8:55 AM

O don’t really get it. Why this code needs to go to MainWindow and not to
TabbedContainer ?
Seems to me that the class that should have knowledge on how to create the
tabs is not mainwindow.

Em sex, 26 de abr de 2019 às 09:55, Thomas Surrel <
noreply@phabricator.kde.org> escreveu:

thsurrel created this revision.
thsurrel added reviewers: Konsole, hindenburg, tcanabrava.
Herald added a project: Konsole.
Herald added a subscriber: konsole-devel.
thsurrel requested review of this revision. View Revision
https://phabricator.kde.org/D20836
*REVISION SUMMARY*

Fix the regression about the placement of a new tab:
it is now added either at the end, or next to the
current tab depending on the setting.

BUG: 406409

*TEST PLAN*

In Konsole settings, select 'Put new tab after the
current tab' for the New tab behavior setting.
Open some new tabs and check they are opened at the
proper position.

*REPOSITORY*
R319 Konsole

*BRANCH*
arc_newtab

*REVISION DETAIL*
https://phabricator.kde.org/D20836

*AFFECTED FILES*
src/MainWindow.cpp
src/MainWindow.h
src/ViewContainer.cpp
src/ViewManager.cpp
src/ViewManager.h

*To: *thsurrel, Konsole, hindenburg, tcanabrava
*Cc: *konsole-devel, gennad, thsurrel, ngraham, maximilianocuria,
hindenburg

Yeah, I was unsure because TabbedViewContainer::addView already had an 'index' parameter. I will move it there and remove that parameter.

thsurrel updated this revision to Diff 57025.Apr 26 2019, 11:26 AM

Moved to TabbedViewContainer

tcanabrava accepted this revision.Apr 26 2019, 11:35 AM
This revision is now accepted and ready to land.Apr 26 2019, 11:35 AM
This revision was automatically updated to reflect the committed changes.