[PATCH 0 of 1 ] Proposal to fix #1673

2 views
Skip to first unread message

André Sintzoff

unread,
Feb 25, 2012, 10:18:49 AM2/25/12
to thg...@googlegroups.com
Hello,

This patch seems to fix #1673.
Nevertheless, I'm not sure to solve the root cause.
Could somebody else give his opinion?

Thank you

André

André Sintzoff

unread,
Feb 25, 2012, 10:18:50 AM2/25/12
to thg...@googlegroups.com
# HG changeset patch
# User André Sintzoff <andre.s...@gmail.com>
# Date 1330182237 -3600
# Branch stable
# Node ID d6f9bd9f1b562f966186e8aa28aecb50817ad434
# Parent b0f8429bd59b6ab659369e1aa48422fb9be87c2e
repowidget: don't clearSelection in gotoParent (fixes #1673)

diff --git a/tortoisehg/hgqt/repowidget.py b/tortoisehg/hgqt/repowidget.py
--- a/tortoisehg/hgqt/repowidget.py
+++ b/tortoisehg/hgqt/repowidget.py
@@ -816,7 +816,6 @@
self.showMessage(hglib.tounicode(str(e)))

def gotoParent(self):
- self.repoview.clearSelection()
self.goto('.')

def gotoTip(self):

Yuya Nishihara

unread,
Feb 27, 2012, 11:31:12 AM2/27/12
to thg...@googlegroups.com

Maybe originally this tried to deselect rows except for '.'. For example,

- select rev. 100, 101(=.) in order
- gotoParent()

should select only 101. But due to workaround for issue 1019, it happens to
deselect everything.

https://bitbucket.org/tortoisehg/thg/issue/1019

Regards,

André Sintzoff

unread,
Mar 1, 2012, 3:14:24 PM3/1/12
to thg...@googlegroups.com
2012/2/27 Yuya Nishihara <you...@gmail.com>:

What do you suggest to fix #1673? I don't see any elegant solution.

André

Yuya Nishihara

unread,
Mar 2, 2012, 11:31:02 AM3/2/12
to thg...@googlegroups.com
2012/3/2 André Sintzoff <andre.s...@gmail.com>
Even though I said clearSelection() had a meaning, your patch is good
workable solution, I think.

Regards,

Johan Samyn

unread,
Mar 3, 2012, 6:10:07 AM3/3/12
to thg...@googlegroups.com
André,
I just tried out your patch. At first it looked good, that's why I did not react when you proposed this solution. But I'm not sure if people are gonna like 2 colored lines might be in view at the same time now (which I just experienced). An F5 after Ctrl-P clears that previous selection. But I guess always (automatically) a refresh after Ctrl-P is too much penalty ? Maybe first checking if the current rev is not already selected, and just return or only do a scrollTo in that 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-Exupery
Reply all
Reply to author
Forward
0 new messages