Issue #1019 resolved

Strange Ctrl-Click Behaviour in Revision History View

Anonymous created an issue

If I use the Revision Details task tab, the revision history view behaves as expected: A click on a line selects the revision line (line is shown in white text on blue background). A ctrl-click on another line selects this line in addition to the already selected line(s). *A ctrl-click on a selected line deselects it.

However, if I change to the Manifest task tab, the revision history view behaves differently: A click on a line selects the revision line (ok). A ctrl-click on another line does not select it, only a small dotted rectangle shows up between the graph and the revision number. Another ctrl-click on the same line selects the line (in addition to the already selected line(s)). Subsequent ctrl-clicks on the same line toggle the selection state of that line. A ctrl-click on another line doesn't change the selection state of any line, only the dotted rectangle appears. Another ctrl-click on the same other line toggles it selection state.

My impression is that the first ctrl-click sets the focus to a line, and only a ctrl-click on a line that already has the focus toggles the selection state, which is somewhat strange.

Another oddity: If I select several revision lines while in the Revision Details task tab and then change to the Manifest task tab, most lines get deselected; only the line I had selected last stays selected. If I select several revision lines while in the Manifest task tab and then change to the Revision Details task tab, all lines stay selected. I can even change back to the Manifest task tab, and all lines stay selected.

Admittedly this behaviour does't hurt too much, but it's rather strange and I can hardly believe its intentional.

Observed with TortoiseHG 2.1.1 / WinXP SP3.

Comments (3)

  1. Yuya Nishihara

    repoview: fix multi-select behavior with manifest (fixes #1019 again)

    The problem happens because the selection state is toggled twice:

    user ctrl+clicks new row repomodel moves current index to the clicked row repomodel emits currentRowChanged repoview emits revisionSelected repowidget calls manifestwidget.setRev() manifestwidget emits revChanged repowidget calls repoview.goto() the row becomes selected state by setCurrentIndex() repomodel toggles the selection state of the row (thus it becomes deselected)

    46296c315034

  2. Log in to comment