]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/views/dolphinview.cpp
SVN_SILENT made messages (.desktop file)
[dolphin.git] / src / views / dolphinview.cpp
index 4ab16e0528a7eb3e4a8ae98c3cc25437c673ad61..681ce74f7fe352f4305ee439069984bb2e2d4106 100644 (file)
@@ -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()