[haiku-bugs] Re: [Haiku] #4414: Selection drawing error in list

  • From: "stippi" <trac@xxxxxxxxxxxx>
  • Date: Tue, 05 May 2015 10:34:20 -0000

#4414: Selection drawing error in list
----------------------------------+----------------------------
Reporter: humdinger | Owner: nobody
Type: bug | Status: new
Priority: low | Milestone: R1
Component: Kits/Interface Kit | Version: R1/Development
Resolution: | Keywords:
Blocked By: | Blocking:
Has a Patch: 1 | Platform: All
----------------------------------+----------------------------

Comment (by stippi):

Replying to [comment:7 Janus]:

Replying to [comment:6 stippi]:
This is not a fix, and it makes things worse, actually, by not
adopting the UI to the selection under a mysterious condition.

I don't understand what do you mean, this patch move the focus row with
the selection when the user select one partition in the PartitionView.

But in the wrong place. Your patch is for `DriveSetup`, but any patch of
this kind should be in `BColumnListView`. If it is the desired behavior in
`DriveSetup` to move the focus row with the selection, then it must be the
desired behavior in any other app. But your patch can obviously not fix it
for other applications, unless you fix it at the source of the problem.

How make things worse?

You introduced a condition `if (focusRow != row)`. If this condition is
`true`, then ` _AdaptToSelectedPartition()` no longer called. I am pretty
convinced that this is a real error. The UI will not adopt to the selected
partition anymore, unless the focus row already happens to be the selected
partition.

See my comment:1. The fix should be done in `BColumnListView`. The
focus row is set when the user clicks a row (and it is selected by the
list view code). However, when another row is selected programatically,
the focus row is not adjusted to the changed selection. However, that is
what should happen.

This works in single row selection, with SetFocusRow you move the focus
and eventually the selection. But this function invoke the
SELECTION_CHANGE only if the focusRow is different from the previous
value.

Ok, but I am talking about these calls:

{{{
fListView->DeselectAll();
fListView->AddToSelection(row);
}}}

This should change the focus row automatically, because it makes no sense
that it should stay detached from the selection.

I agree that the class need a review, the edit mode doesn't work at all.

This seems unrelated.

--
Ticket URL: <https://dev.haiku-os.org/ticket/4414#comment:8>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: