diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -551,7 +551,7 @@ // URL instead of all items of the view KUrlNavigator* urlNavigator = m_activeViewContainer->urlNavigator(); - QLineEdit* lineEdit = urlNavigator->editor()->lineEdit(); // krazy:exclude=qclasses + QLineEdit* lineEdit = urlNavigator->editor()->lineEdit(); const bool selectUrl = urlNavigator->isUrlEditable() && lineEdit->hasFocus(); if (selectUrl) { @@ -621,12 +621,19 @@ void DolphinMainWindow::replaceLocation() { KUrlNavigator* navigator = m_activeViewContainer->urlNavigator(); - navigator->setUrlEditable(true); - navigator->setFocus(); - - // select the whole text of the combo box editor - QLineEdit* lineEdit = navigator->editor()->lineEdit(); // krazy:exclude=qclasses - lineEdit->selectAll(); + QLineEdit* lineEdit = navigator->editor()->lineEdit(); + + // If the text field currently has focus and everything is selected, + // pressing the keyboard shortcut returns the whole thing to breadcrumb mode + if (navigator->isUrlEditable() + && lineEdit->hasFocus() + && lineEdit->selectedText() == lineEdit->text() ) { + navigator->setUrlEditable(false); + } else { + navigator->setUrlEditable(true); + navigator->setFocus(); + lineEdit->selectAll(); + } } void DolphinMainWindow::togglePanelLockState() @@ -965,6 +972,9 @@ void DolphinMainWindow::activeViewChanged(DolphinViewContainer* viewContainer) { + if(m_activeViewContainer == viewContainer) { + return; + } DolphinViewContainer* oldViewContainer = m_activeViewContainer; Q_ASSERT(viewContainer); @@ -1001,7 +1011,10 @@ void DolphinMainWindow::updateWindowTitle() { - setWindowTitle(m_activeViewContainer->caption()); + QString newTitle = m_activeViewContainer->caption(); + if(windowTitle() != newTitle) { + setWindowTitle(newTitle); + } } void DolphinMainWindow::slotStorageTearDownFromPlacesRequested(const QString& mountPath)