mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-19 16:31:21 +00:00
It is possible that the selection of an inactive column gets changed (e. g. by the selection markers). In this case the column should get active.
BUG: 188979 svn path=/trunk/KDE/kdebase/apps/; revision=1070789
This commit is contained in:
parent
923a47290f
commit
b93b305d2e
|
@ -192,6 +192,22 @@ KFileItem DolphinColumnView::itemAt(const QPoint& pos) const
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DolphinColumnView::setSelectionModel(QItemSelectionModel* model)
|
||||||
|
{
|
||||||
|
// If a change of the selection is done although the view is not active
|
||||||
|
// (e. g. by the selection markers), the column must be activated. This
|
||||||
|
// is done by listening to the current selectionChanged() signal.
|
||||||
|
if (selectionModel() != 0) {
|
||||||
|
disconnect(selectionModel(), SIGNAL(selectionChanged(QItemSelection, QItemSelection)),
|
||||||
|
this, SLOT(requestActivation()));
|
||||||
|
}
|
||||||
|
|
||||||
|
QListView::setSelectionModel(model);
|
||||||
|
|
||||||
|
connect(selectionModel(), SIGNAL(selectionChanged(QItemSelection, QItemSelection)),
|
||||||
|
this, SLOT(requestActivation()));
|
||||||
|
}
|
||||||
|
|
||||||
QStyleOptionViewItem DolphinColumnView::viewOptions() const
|
QStyleOptionViewItem DolphinColumnView::viewOptions() const
|
||||||
{
|
{
|
||||||
QStyleOptionViewItem viewOptions = QListView::viewOptions();
|
QStyleOptionViewItem viewOptions = QListView::viewOptions();
|
||||||
|
|
|
@ -85,6 +85,8 @@ public:
|
||||||
*/
|
*/
|
||||||
KFileItem itemAt(const QPoint& pos) const;
|
KFileItem itemAt(const QPoint& pos) const;
|
||||||
|
|
||||||
|
virtual void setSelectionModel(QItemSelectionModel* model);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual QStyleOptionViewItem viewOptions() const;
|
virtual QStyleOptionViewItem viewOptions() const;
|
||||||
virtual void startDrag(Qt::DropActions supportedActions);
|
virtual void startDrag(Qt::DropActions supportedActions);
|
||||||
|
|
Loading…
Reference in a new issue