]> cloud.milkyroute.net Git - dolphin.git/commitdiff
assure that the autoresizing still works in combination with the "automatically expan...
authorPeter Penz <peter.penz19@gmail.com>
Sun, 2 Nov 2008 14:29:27 +0000 (14:29 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Sun, 2 Nov 2008 14:29:27 +0000 (14:29 +0000)
svn path=/trunk/KDE/kdebase/apps/; revision=879152

src/dolphindetailsview.cpp

index b2425b93ffba676eaf39315f95cd8517d669012a..883f5a774b1ad8fdf9ca0d14f7d03ac797230052 100644 (file)
@@ -47,7 +47,7 @@
 
 DolphinDetailsView::DolphinDetailsView(QWidget* parent, DolphinController* controller) :
     QTreeView(parent),
-       m_autoResize(true),
+    m_autoResize(true),
     m_expandingTogglePressed(false),
     m_keyPressed(false),
     m_useDefaultIndexAt(true),
@@ -606,7 +606,10 @@ void DolphinDetailsView::slotHeaderSectionResized(int logicalIndex, int oldSize,
     Q_UNUSED(logicalIndex);
     Q_UNUSED(oldSize);
     Q_UNUSED(newSize);
-    if (QApplication::mouseButtons() & Qt::LeftButton) {
+    // If the user changes the size of the headers, the autoresize feature should be
+    // turned off. As there is no dedicated interface to find out whether the header
+    // section has been resized by the user or by a resize event, the following approach is used:
+    if ((QApplication::mouseButtons() & Qt::LeftButton) && isVisible()) {
         disableAutoResizing();
     }
 }