diff options
| author | Peter Penz <[email protected]> | 2010-03-23 21:29:58 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2010-03-23 21:29:58 +0000 |
| commit | eaa27ac4b4374b6768879ea32562ac32a3c54fb4 (patch) | |
| tree | 4c838455c20bd3cb7cb434e45ababa4362b78082 /src/dolphinmainwindow.cpp | |
| parent | ee0eb84df4d3169b49d877ef850c4702963ce90f (diff) | |
Assure that when opening a new tab, that the URL navigator of the new tab has the same editable state as the current tab
Thanks to Vishesh Handa for the patch!
svn path=/trunk/KDE/kdebase/apps/; revision=1106757
Diffstat (limited to 'src/dolphinmainwindow.cpp')
| -rw-r--r-- | src/dolphinmainwindow.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index fb248c24c..9272713cc 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -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(); } |
