┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphincolumnview.cpp
diff options
context:
space:
mode:
authorSimon Paul St James <[email protected]>2009-01-25 19:46:08 +0000
committerSimon Paul St James <[email protected]>2009-01-25 19:46:08 +0000
commit248ce7c57a86f964c82c8e0b48e9c07d52c3934e (patch)
treecaaccbaa1723f82aae9491dd7abc3464d4c4c346 /src/dolphincolumnview.cpp
parent5b8a817a7328fddbee654721cdb93b560a81f4c5 (diff)
Refactor the folder expansion system. Main effect: instead of having a list of m_expandedViews which cannot yet be deleted, we more accurately identify the current source of the drag operation if any and store only this for later deletion.
This also fixes folder-expansion not working in Column view. svn path=/trunk/KDE/kdebase/apps/; revision=916701
Diffstat (limited to 'src/dolphincolumnview.cpp')
-rw-r--r--src/dolphincolumnview.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/dolphincolumnview.cpp b/src/dolphincolumnview.cpp
index bc488b8ae..3b3e86a75 100644
--- a/src/dolphincolumnview.cpp
+++ b/src/dolphincolumnview.cpp
@@ -26,6 +26,8 @@
#include "dolphin_columnmodesettings.h"
+#include <kfilepreviewgenerator.h>
+
#include <QPoint>
#include <QScrollBar>
#include <QTimeLine>
@@ -594,8 +596,16 @@ void DolphinColumnView::deleteColumn(DolphinColumnWidget* column)
if (m_controller->itemView() == column) {
m_controller->setItemView(0);
}
+ // deleteWhenNotDragSource(column) does not necessarily delete column,
+ // and we want its preview generator destroyed immediately.
+ column->m_previewGenerator->deleteLater();
+ column->m_previewGenerator = 0;
+ column->hide();
+ // Prevent automatic destruction of column when this DolphinColumnView
+ // is destroyed.
+ column->setParent(0);
column->disconnect();
- column->deleteLater();
+ emit requestColumnDeletion(column);
}
}