]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Assure that when opening a new tab, that the URL navigator of the new tab has the...
authorPeter Penz <peter.penz19@gmail.com>
Tue, 23 Mar 2010 21:29:58 +0000 (21:29 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Tue, 23 Mar 2010 21:29:58 +0000 (21:29 +0000)
Thanks to Vishesh Handa for the patch!

svn path=/trunk/KDE/kdebase/apps/; revision=1106757

src/dolphinmainwindow.cpp

index fb248c24c581d5330383714dae022c46c83abad6..9272713ccd552aab048e6c5fd49b929fccfe207c 100644 (file)
@@ -387,12 +387,15 @@ void DolphinMainWindow::openNewMainWindow()
 
 void DolphinMainWindow::openNewTab()
 {
+    const bool isUrlEditable =  m_activeViewContainer->urlNavigator()->isUrlEditable();
+
     openNewTab(m_activeViewContainer->url());
     m_tabBar->setCurrentIndex(m_viewTab.count() - 1);
 
-    KUrlNavigator* navigator = m_activeViewContainer->urlNavigator();
-    if (navigator->isUrlEditable()) {
-        // if a new tab is opened and the URL is editable, assure that
+    if (isUrlEditable) {
+        KUrlNavigator* navigator = m_activeViewContainer->urlNavigator();
+        navigator->setUrlEditable(true);
+        // If a new tab is opened and the URL is editable, assure that
         // the user can edit the URL without manually setting the focus
         navigator->setFocus();
     }