diff options
| author | Peter Penz <[email protected]> | 2008-05-11 18:37:33 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2008-05-11 18:37:33 +0000 |
| commit | 75c91317fe33cb81342cabcfe0fa64c947fdd8e8 (patch) | |
| tree | df3895f01eee828b4295e365de8c1f32c5e12c5d /src | |
| parent | 52489c2dbc03dabbf0a5b1571e3bb50740af21ac (diff) | |
Update the internal state only, if no expanding/collapsing area has been hit (otherwise QTreeView assumes a dragging operation is done).
svn path=/trunk/KDE/kdebase/apps/; revision=806561
Diffstat (limited to 'src')
| -rw-r--r-- | src/dolphindetailsview.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/dolphindetailsview.cpp b/src/dolphindetailsview.cpp index 29ee90830..e33d94c18 100644 --- a/src/dolphindetailsview.cpp +++ b/src/dolphindetailsview.cpp @@ -188,9 +188,16 @@ void DolphinDetailsView::mousePressEvent(QMouseEvent* event) QTreeView::mousePressEvent(event); const QModelIndex index = indexAt(event->pos()); - if (index.isValid() && (event->button() == Qt::LeftButton)) { - // TODO: see comment in DolphinIconsView::mousePressEvent() - setState(QAbstractItemView::DraggingState); + const bool updateState = index.isValid() && + (index.column() == DolphinModel::Name) && + (event->button() == Qt::LeftButton); + if (updateState) { + // TODO: See comment in DolphinIconsView::mousePressEvent(). Only update + // the state if no expanding/collapsing area has been hit: + const QRect rect = visualRect(index); + if (event->pos().x() >= rect.x() + indentation()) { + setState(QAbstractItemView::DraggingState); + } } if (!index.isValid() || (index.column() != DolphinModel::Name)) { |
