X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/d3496b12310d9fec0e52e537c341e87fcaa2f8b5..ca5d3fde114dfdb280e46995e8a425d3ec558596:/src/views/dolphinview.cpp diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index 4ab16e052..681ce74f7 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -609,6 +609,10 @@ void DolphinView::renameSelectedItems() dialog->raise(); dialog->activateWindow(); } + + // assure that the current index remains visible when KDirLister + // will notify the view about changed items + m_assureVisibleCurrentIndex = true; } void DolphinView::trashSelectedItems() @@ -684,6 +688,8 @@ void DolphinView::setShowHiddenFiles(bool show) return; } + m_selectedItems = selectedItems(); + const KUrl viewPropsUrl = rootUrl(); ViewProperties props(viewPropsUrl); props.setShowHiddenFiles(show); @@ -768,6 +774,14 @@ bool DolphinView::eventFilter(QObject* watched, QEvent* event) return QWidget::eventFilter(watched, event); } +void DolphinView::showEvent(QShowEvent* event) +{ + QWidget::showEvent(event); + if (!event->spontaneous()) { + loadDirectory(url()); + } +} + void DolphinView::activate() { setActive(true); @@ -1470,6 +1484,11 @@ void DolphinView::ViewAccessor::createView(QWidget* parent, default: Q_ASSERT(false); } + + KDirLister* lister = dirLister(); + if (lister) { + lister->setMainWindow(parent->window()); + } } void DolphinView::ViewAccessor::deleteView()