It looks view.setCurrentIndex() is Ctrl-key-aware.
Note that even with this change, we cannot get rid of 46296c315034.
It happens *after* invocation of goto().
diff --git a/tortoisehg/hgqt/repoview.py b/tortoisehg/hgqt/repoview.py
--- a/tortoisehg/hgqt/repoview.py
+++ b/tortoisehg/hgqt/repoview.py
@@ -281,7 +281,9 @@ class HgRepoView(QTableView):
if idx is not None:
# avoid unwanted selection change (#1019)
if self.currentIndex().row() != idx.row():
- self.setCurrentIndex(idx)
+ flags = (QItemSelectionModel.ClearAndSelect
+ | QItemSelectionModel.Rows)
+ self.selectionModel().setCurrentIndex(idx, flags)
self.scrollTo(idx)
def saveSettings(self, s = None):
Yuya,
Looks like we send in a patch for this both at the same time :-) .
I suspect yours is more genericly applicable then only for the Ctrl-P case ?
Johan
--
___________________________________________________________________
"Perfection is achieved, not when there is nothing more to add,
but when there is nothing left to take away." - A. de Saint-Exup�ry
On 04-03-2012 17:20, Yuya Nishihara wrote:2012/3/5 Johan Samyn <johan...@gmail.com>
I believe it's unintended behavior that "Ctrl+goto(rev)" selects multiple rows.This patch affects any Ctrl+goto(rev) cases including Ctrl+P.
Yes, I fully agree your solution is better than mine.