diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-04-10 19:11:54 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-04-10 19:11:54 +0200 |
commit | 7e0bc7dab417bd01acd50a9a95f324e5b8e1d79a (patch) | |
tree | be1ea5e072d8eb7f393f9e4c8a1e4b25effb5a31 /src/mainview.cpp | |
parent | pedantic (diff) | |
download | rekonq-7e0bc7dab417bd01acd50a9a95f324e5b8e1d79a.tar.xz |
new tab has to have focusgit st
Diffstat (limited to 'src/mainview.cpp')
-rw-r--r-- | src/mainview.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/mainview.cpp b/src/mainview.cpp index 2ada96e0..eb2ae732 100644 --- a/src/mainview.cpp +++ b/src/mainview.cpp @@ -342,7 +342,7 @@ int MainView::webViewIndex(WebView *webView) const } -WebView *MainView::newWebView(bool makeCurrent) +WebView *MainView::newWebView() { // line edit UrlBar *urlLineEdit = new UrlBar; @@ -399,14 +399,15 @@ WebView *MainView::newWebView(bool makeCurrent) connect(webView, SIGNAL(shiftCtrlTabPressed()), this, SLOT(previousTab())); addTab(webView, i18n("(Untitled)")); - if (makeCurrent) - { - setCurrentWidget(webView); - currentLineEdit()->setFocus(Qt::ActiveWindowFocusReason); - } + setCurrentWidget(webView); + + // FIXME: focus on currentLineEdit just for empty pages + currentLineEdit()->setFocus(Qt::ActiveWindowFocusReason); if (count() == 1) + { currentChanged(currentIndex()); + } emit tabsChanged(); showTabBar(); @@ -486,7 +487,7 @@ void MainView::slotCloneTab(int index) index = currentIndex(); if (index < 0 || index >= count()) return; - WebView *tab = newWebView(false); + WebView *tab = newWebView(); tab->setUrl(webView(index)->url()); showTabBar(); |