summaryrefslogtreecommitdiff
path: root/src/mainview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainview.cpp')
-rw-r--r--src/mainview.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mainview.cpp b/src/mainview.cpp
index 7c91b992..c28953d7 100644
--- a/src/mainview.cpp
+++ b/src/mainview.cpp
@@ -256,7 +256,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?
@@ -274,7 +274,10 @@ WebView *MainView::newWebView(bool focused)
connect(webView->page(), SIGNAL(windowCloseRequested()), this, SLOT(windowCloseRequested()));
connect(webView->page(), SIGNAL(printRequested(QWebFrame *)), this, SIGNAL(printRequested(QWebFrame *)));
- addTab(webView, i18n("(Untitled)"));
+ if (nearParent)
+ insertTab(currentIndex() + 1, webView, i18n("(Untitled)"));
+ else
+ addTab(webView, i18n("(Untitled)"));
if (focused)
{