mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02:36:34 +01:00
[Fix:] Opening link (target=blank) in new selected tab (regression)
This commit is contained in:
parent
820e87594f
commit
d5c9b40601
@ -245,7 +245,7 @@ int TabWidget::addView(QUrl url, const QString &title, OpenUrlIn openIn, bool se
|
||||
{
|
||||
m_lastTabIndex = currentIndex();
|
||||
|
||||
if (url.isEmpty() && openIn != CleanPage) {
|
||||
if (url.isEmpty() && openIn != CleanPage && openIn != CleanSelectedPage) {
|
||||
url = m_urlOnNewTab;
|
||||
}
|
||||
|
||||
@ -259,7 +259,7 @@ int TabWidget::addView(QUrl url, const QString &title, OpenUrlIn openIn, bool se
|
||||
webView->animationLoading(index, true)->movie()->stop();
|
||||
webView->animationLoading(index, false)->setPixmap(_iconForUrl(url).pixmap(16, 16));
|
||||
|
||||
if (openIn == TabWidget::NewSelectedTab) {
|
||||
if (openIn == NewSelectedTab || openIn == CleanSelectedPage) {
|
||||
setCurrentIndex(index);
|
||||
}
|
||||
|
||||
@ -289,7 +289,7 @@ int TabWidget::addView(QUrl url, const QString &title, OpenUrlIn openIn, bool se
|
||||
p_QupZilla->locationBar()->setFocus();
|
||||
}
|
||||
|
||||
if (openIn == NewSelectedTab) {
|
||||
if (openIn == NewSelectedTab || openIn == CleanSelectedPage) {
|
||||
m_isClosingToLastTabIndex = true;
|
||||
m_locationBars->setCurrentWidget(locBar);
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ class TabWidget : public QTabWidget
|
||||
public:
|
||||
explicit TabWidget(QupZilla* mainclass, QWidget* parent = 0);
|
||||
~TabWidget();
|
||||
enum OpenUrlIn { CurrentTab, NewSelectedTab, NewNotSelectedTab, NewTab = NewSelectedTab, CleanPage };
|
||||
enum OpenUrlIn { CurrentTab, NewSelectedTab, NewNotSelectedTab, NewTab = NewSelectedTab, CleanPage, CleanSelectedPage };
|
||||
|
||||
QByteArray saveState();
|
||||
bool restoreState(const QByteArray &state);
|
||||
|
@ -213,7 +213,7 @@ QWebPage* WebPage::createWindow(QWebPage::WebWindowType type)
|
||||
// view->show();
|
||||
// return view->page();
|
||||
Q_UNUSED(type);
|
||||
int index = p_QupZilla->tabWidget()->addView(QUrl(), tr("New tab"), TabWidget::CleanPage);
|
||||
int index = p_QupZilla->tabWidget()->addView(QUrl(), tr("New tab"), TabWidget::CleanSelectedPage);
|
||||
return p_QupZilla->weView(index)->page();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user