mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-19 16:31:21 +00:00
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
This commit is contained in:
parent
ee0eb84df4
commit
eaa27ac4b4
|
@ -387,12 +387,15 @@ void DolphinMainWindow::openNewMainWindow()
|
||||||
|
|
||||||
void DolphinMainWindow::openNewTab()
|
void DolphinMainWindow::openNewTab()
|
||||||
{
|
{
|
||||||
|
const bool isUrlEditable = m_activeViewContainer->urlNavigator()->isUrlEditable();
|
||||||
|
|
||||||
openNewTab(m_activeViewContainer->url());
|
openNewTab(m_activeViewContainer->url());
|
||||||
m_tabBar->setCurrentIndex(m_viewTab.count() - 1);
|
m_tabBar->setCurrentIndex(m_viewTab.count() - 1);
|
||||||
|
|
||||||
KUrlNavigator* navigator = m_activeViewContainer->urlNavigator();
|
if (isUrlEditable) {
|
||||||
if (navigator->isUrlEditable()) {
|
KUrlNavigator* navigator = m_activeViewContainer->urlNavigator();
|
||||||
// if a new tab is opened and the URL is editable, assure that
|
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
|
// the user can edit the URL without manually setting the focus
|
||||||
navigator->setFocus();
|
navigator->setFocus();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue