X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/dea4444c4a8d615c68bd6d2b05124cc8d66bd6d7..f2aae09edd023bb0bb4e56e6662bc0afc9550e54:/src/dolphindetailsview.cpp diff --git a/src/dolphindetailsview.cpp b/src/dolphindetailsview.cpp index b127aad49..883f5a774 100644 --- a/src/dolphindetailsview.cpp +++ b/src/dolphindetailsview.cpp @@ -47,16 +47,16 @@ DolphinDetailsView::DolphinDetailsView(QWidget* parent, DolphinController* controller) : QTreeView(parent), - m_autoResize(true), + m_autoResize(true), m_expandingTogglePressed(false), m_keyPressed(false), m_useDefaultIndexAt(true), + m_ignoreScrollTo(false), m_controller(controller), m_selectionManager(0), m_font(), m_decorationSize(), - m_band(), - m_ignoreScrollTo(false) + m_band() { const DetailsModeSettings* settings = DolphinSettings::instance().detailsModeSettings(); Q_ASSERT(settings != 0); @@ -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(); } }