setState(QAbstractItemView::DraggingState);
} else {
m_expandingTogglePressed = true;
- kDebug() << "m_expandingTogglePressed " << m_expandingTogglePressed;
}
}
QTreeView::setSelection(rect, command);
m_useDefaultIndexAt = false;
} else {
-
// Use our own elastic band selection algorithm
updateElasticBandSelection();
}
void DolphinDetailsView::scrollTo(const QModelIndex & index, ScrollHint hint)
{
- if (m_ignoreScrollTo)
- return;
- QTreeView::scrollTo(index, hint);
+ if (!m_ignoreScrollTo) {
+ QTreeView::scrollTo(index, hint);
+ }
}
void DolphinDetailsView::setSortIndicatorSection(DolphinView::Sorting sorting)
m_band.destination = viewport()->mapFromGlobal(QCursor::pos()) + scrollPos;
// Going above the (logical) top-left of the view causes complications during selection;
// we may as well prevent it.
- if (m_band.destination.y() < 0)
+ if (m_band.destination.y() < 0) {
m_band.destination.setY(0);
- if (m_band.destination.x() < 0)
+ }
+ if (m_band.destination.x() < 0) {
m_band.destination.setX(0);
+ }
dirtyRegion = dirtyRegion.united(elasticBandRect());
setDirtyRegion(dirtyRegion);