X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/4f6b9c72d35e7b4638cbc28df66ecbde0e903136..da3bc09d21b43837873c899e2fbda1fa6c2a2e5e:/src/dolphinview.cpp diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp index e450da339..e06bc72f2 100644 --- a/src/dolphinview.cpp +++ b/src/dolphinview.cpp @@ -205,6 +205,14 @@ void DolphinView::setMode(Mode mode) m_mode = mode; + if (isColumnViewActive()) { + // When changing the mode in the column view, it makes sense + // to go back to the root URL of the column view automatically. + // Otherwise there it would not be possible to turn off the column view + // without focusing the first column. + setUrl(m_dirLister->url()); + } + ViewProperties props(m_urlNavigator->url()); props.setViewMode(m_mode); @@ -223,12 +231,11 @@ void DolphinView::setShowPreview(bool show) { ViewProperties props(m_urlNavigator->url()); props.setShowPreview(show); - props.save(); m_controller->setShowPreview(show); - emit showPreviewChanged(); - reload(); + + startDirLister(m_urlNavigator->url(), true); } bool DolphinView::showPreview() const @@ -244,12 +251,11 @@ void DolphinView::setShowHiddenFiles(bool show) ViewProperties props(m_urlNavigator->url()); props.setShowHiddenFiles(show); - props.save(); m_dirLister->setShowingDotFiles(show); emit showHiddenFilesChanged(); - reload(); + startDirLister(m_urlNavigator->url(), true); } bool DolphinView::showHiddenFiles() const @@ -457,7 +463,7 @@ void DolphinView::setAdditionalInfo(KFileItemDelegate::AdditionalInformation inf m_fileItemDelegate->setAdditionalInformation(info); emit additionalInfoChanged(info); - reload(); + startDirLister(m_urlNavigator->url(), true); } KFileItemDelegate::AdditionalInformation DolphinView::additionalInfo() const @@ -584,7 +590,6 @@ void DolphinView::rename(const KUrl& source, const QString& newName) default: // the renaming operation has been canceled - reload(); return; } } else { @@ -602,7 +607,6 @@ void DolphinView::rename(const KUrl& source, const QString& newName) } else { m_statusBar->setMessage(i18n("Renaming of file '%1' to '%2' failed.", source.fileName(), destFileName), DolphinStatusBar::Error); - reload(); } }