mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-24 12:46:35 +01:00
TabManager: Fix add tab button when grouping type is not window
This commit is contained in:
parent
eb0cf5065d
commit
f57d6d0682
@ -218,15 +218,15 @@ void TabManagerWidget::onItemActivated(QTreeWidgetItem* item, int column)
|
||||
BrowserWindow* mainWindow = qobject_cast<BrowserWindow*>(qvariant_cast<QWidget*>(item->data(0, QupZillaPointerRole)));
|
||||
QWidget* tabWidget = qvariant_cast<QWidget*>(item->data(0, WebTabPointerRole));
|
||||
|
||||
if (!mainWindow) {
|
||||
if (column == 1) {
|
||||
if (item->childCount() > 0)
|
||||
QMetaObject::invokeMethod(mainWindow ? mainWindow : mApp->getWindow(), "addTab");
|
||||
else if (tabWidget && mainWindow)
|
||||
mainWindow->tabWidget()->requestCloseTab(mainWindow->tabWidget()->indexOf(tabWidget));
|
||||
return;
|
||||
}
|
||||
|
||||
if (column == 1) {
|
||||
if (item->childCount() == 0 && tabWidget)
|
||||
mainWindow->tabWidget()->requestCloseTab(mainWindow->tabWidget()->indexOf(tabWidget));
|
||||
else if (item->childCount() > 0)
|
||||
QMetaObject::invokeMethod(mainWindow, "addTab");
|
||||
if (!mainWindow) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user