diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2012-11-26 19:15:24 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2012-12-10 02:48:06 +0100 |
commit | 06b43a83c432ae50fbc1e01e277aa4caf98df72e (patch) | |
tree | 8be2765e6bd2ce47550eceaa5bedfd6c70011419 /src/webtab/webview.cpp | |
parent | Fix tabs moves when some of them are pinned (diff) | |
download | rekonq-06b43a83c432ae50fbc1e01e277aa4caf98df72e.tar.xz |
Open focused link when launched from web app
Diffstat (limited to 'src/webtab/webview.cpp')
-rw-r--r-- | src/webtab/webview.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/webtab/webview.cpp b/src/webtab/webview.cpp index 48c35615..0cc09574 100644 --- a/src/webtab/webview.cpp +++ b/src/webtab/webview.cpp @@ -764,7 +764,13 @@ void WebView::openLinkInNewTab() KAction *a = qobject_cast<KAction*>(sender()); KUrl url(a->data().toUrl()); - emit loadUrl(url, Rekonq::NewTab); + WebTab *tab = qobject_cast<WebTab *>(parent()); + WebWindow *webwin = tab->webWindow(); + + if (webwin) + emit loadUrl(url, Rekonq::NewTab); + else + emit loadUrl(url, Rekonq::NewFocusedTab); } void WebView::openLinkInPrivateWindow() |