Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 9e1a3b41 authored by Kurt Hindenburg's avatar Kurt Hindenburg

Fix crash while trying to move tab with only one view

BUG: 402278
parent 64a93ce5
......@@ -229,6 +229,9 @@ void TabbedViewContainer::setCssFromFile(const QUrl &url)
void TabbedViewContainer::moveActiveView(MoveDirection direction)
{
if (count() < 2) { // return if only one view
return;
}
const int currentIndex = indexOf(currentWidget());
int newIndex = direction == MoveViewLeft ? qMax(currentIndex - 1, 0) : qMin(currentIndex + 1, count() - 1);
......
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