From 248ce7c57a86f964c82c8e0b48e9c07d52c3934e Mon Sep 17 00:00:00 2001 From: Simon Paul St James Date: Sun, 25 Jan 2009 19:46:08 +0000 Subject: 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 --- src/dolphincolumnview.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/dolphincolumnview.cpp') 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 + #include #include #include @@ -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); } } -- cgit v1.3