mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-20 00:41:23 +00:00
The column view did not obey single/double-click navigation settings, it does now. The signals were only connected to the singleClick(), not the doubleClick() method. They are now also connected/disconnected according to the setting that is set globally.
svn path=/trunk/KDE/kdebase/apps/; revision=921975
This commit is contained in:
parent
5e20f374e3
commit
2a3e27b9fe
|
@ -414,7 +414,7 @@ void DolphinColumnWidget::contextMenuEvent(QContextMenuEvent* event)
|
|||
|
||||
const QPoint pos = m_view->viewport()->mapFromGlobal(event->globalPos());
|
||||
Q_ASSERT(m_view->m_controller->itemView() == this);
|
||||
m_view->m_controller->triggerContextMenuRequest(pos);
|
||||
m_view->m_controller->triggerContextMenuRequest(event->pos());
|
||||
}
|
||||
|
||||
void DolphinColumnWidget::wheelEvent(QWheelEvent* event)
|
||||
|
@ -493,10 +493,17 @@ void DolphinColumnWidget::activate()
|
|||
{
|
||||
setFocus(Qt::OtherFocusReason);
|
||||
|
||||
connect(this, SIGNAL(clicked(const QModelIndex&)),
|
||||
if (KGlobalSettings::singleClick()) {
|
||||
connect(this, SIGNAL(clicked(const QModelIndex&)),
|
||||
m_view->m_controller, SLOT(requestTab(const QModelIndex&)));
|
||||
connect(this, SIGNAL(clicked(const QModelIndex&)),
|
||||
connect(this, SIGNAL(clicked(const QModelIndex&)),
|
||||
m_view->m_controller, SLOT(triggerItem(const QModelIndex&)));
|
||||
} else {
|
||||
connect(this, SIGNAL(doubleClicked(const QModelIndex&)),
|
||||
m_view->m_controller, SLOT(requestTab(const QModelIndex&)));
|
||||
connect(this, SIGNAL(doubleClicked(const QModelIndex&)),
|
||||
m_view->m_controller, SLOT(triggerItem(const QModelIndex&)));
|
||||
}
|
||||
|
||||
if (selectionModel() && selectionModel()->currentIndex().isValid())
|
||||
selectionModel()->setCurrentIndex(selectionModel()->currentIndex(), QItemSelectionModel::SelectCurrent);
|
||||
|
@ -507,10 +514,17 @@ void DolphinColumnWidget::activate()
|
|||
void DolphinColumnWidget::deactivate()
|
||||
{
|
||||
clearFocus();
|
||||
|
||||
disconnect(this, SIGNAL(clicked(const QModelIndex&)),
|
||||
m_view->m_controller, SLOT(triggerItem(const QModelIndex&)));
|
||||
|
||||
if (KGlobalSettings::singleClick()) {
|
||||
disconnect(this, SIGNAL(clicked(const QModelIndex&)),
|
||||
m_view->m_controller, SLOT(requestTab(const QModelIndex&)));
|
||||
disconnect(this, SIGNAL(clicked(const QModelIndex&)),
|
||||
m_view->m_controller, SLOT(triggerItem(const QModelIndex&)));
|
||||
} else {
|
||||
disconnect(this, SIGNAL(doubleClicked(const QModelIndex&)),
|
||||
m_view->m_controller, SLOT(requestTab(const QModelIndex&)));
|
||||
disconnect(this, SIGNAL(doubleClicked(const QModelIndex&)),
|
||||
m_view->m_controller, SLOT(triggerItem(const QModelIndex&)));
|
||||
}
|
||||
const QModelIndex current = selectionModel()->currentIndex();
|
||||
selectionModel()->clear();
|
||||
selectionModel()->setCurrentIndex(current, QItemSelectionModel::NoUpdate);
|
||||
|
|
Loading…
Reference in a new issue