summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Martin <notmart@gmail.com>2017-03-30 17:33:50 (GMT)
committerMarco Martin <notmart@gmail.com>2017-03-30 17:33:50 (GMT)
commitacb088749af1678814fe7718886ca36209b02e79 (patch)
treeccde83d411186e26e115ea934ee646ade6ec3c47
parentf09aa9ce4fb54a7f25692dfa40c54b745506cb0c (diff)
don't reset the view to the top on gaining focus
when the listview gained focus, it used to reset the view position to the first element, but this both lost the previously selected item and was a really weird behavior especially when the focus was gained by click rather than keyboard navigation, and was often seen as a bug. reviewed-by:David Edmundson BUG:363420
-rw-r--r--processui/ksysguardprocesslist.cpp9
1 files changed, 0 insertions, 9 deletions
diff --git a/processui/ksysguardprocesslist.cpp b/processui/ksysguardprocesslist.cpp
index 44603de..dac6f9a 100644
--- a/processui/ksysguardprocesslist.cpp
+++ b/processui/ksysguardprocesslist.cpp
@@ -1437,15 +1437,6 @@ bool KSysGuardProcessList::eventFilter(QObject *obj, QEvent *event) {
return true;
}
}
- } else if (event->type() == QEvent::FocusIn) {
- if (obj == d->mUi->treeView && !d->mUi->treeView->selectionModel()->hasSelection()) {
- // treeview is focused, but there is no current selection. select the first row
- d->mUi->treeView->setCurrentIndex(d->mUi->treeView->model()->index(0, 0));
- } else if (obj == d->mUi->txtFilter) {
- // text field is focused, so clear treeview selection to communicate that you will not
- // interact with any elements in the view until the view is focused explicitly
- d->mUi->treeView->setCurrentIndex(QModelIndex());
- }
}
return false;
}