diff options
Diffstat (limited to 'src/mainview.cpp')
-rw-r--r-- | src/mainview.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mainview.cpp b/src/mainview.cpp index accc1610..a662bbb0 100644 --- a/src/mainview.cpp +++ b/src/mainview.cpp @@ -258,7 +258,7 @@ WebView *MainView::webView(int index) const } -WebView *MainView::newWebView(bool focused) +WebView *MainView::newWebView(bool focused, bool nearParent) { WebView *webView = new WebView; // should be deleted on tab close? @@ -276,8 +276,10 @@ WebView *MainView::newWebView(bool focused) connect(webView->page(), SIGNAL(windowCloseRequested()), this, SLOT(windowCloseRequested())); connect(webView->page(), SIGNAL(printRequested(QWebFrame *)), this, SIGNAL(printRequested(QWebFrame *))); - // opening tab NEAR the previous - insertTab(currentIndex() + 1, webView, i18n("(Untitled)")); + if (nearParent) + insertTab(currentIndex() + 1, webView, i18n("(Untitled)")); + else + addTab(webView, i18n("(Untitled)")); if (focused) { |