request the activation of a column also on directories if not the left mouse button is pressed

svn path=/trunk/KDE/kdebase/apps/; revision=696094
This commit is contained in:
Peter Penz 2007-08-03 20:10:11 +00:00
parent b5a1200417
commit 94594d2a08

View file

@ -60,7 +60,7 @@ public:
void obtainSelectionModel();
void releaseSelectionModel();
protected:
virtual QStyleOptionViewItem viewOptions() const;
virtual void dragEnterEvent(QDragEnterEvent* event);
@ -144,7 +144,7 @@ void ColumnWidget::setActive(bool active)
} else {
releaseSelectionModel();
}
if (m_active == active) {
return;
}
@ -255,6 +255,14 @@ void ColumnWidget::mousePressEvent(QMouseEvent* event)
} else if (item->isDir()) {
m_childUrl = item->url();
viewport()->update();
// Only request the activation if not the left button is pressed.
// The left button on a directory opens a new column, hence requesting
// an activation is useless as the new column will request the activation
// afterwards.
if (event->button() != Qt::LeftButton) {
m_view->requestActivation(this);
}
} else {
m_view->requestActivation(this);
}