Changes between Initial Version and Version 1 of Ticket #4414, comment 9
- Timestamp:
- May 5, 2015, 11:18:27 AM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #4414, comment 9
initial v1 1 > 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. 1 > > 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. 2 > 3 > This is on purpose, if the focusRow is different from the previous the SetFocusRow send a Selection_change that invoke _AdaptToSelectedPartition() and all the code replicated in the two switch cases. 2 4 3 This is on purpose, if the focusRow is different from the previous the SetFocusRow send a Selection_change that invoke _AdaptToSelectedPartition() and all the code replicated in the two switch cases.5 Ok. As you can see from my irritation, it is good to add a comment to such code. The effect is completely counter-intuitive. 4 6 7 In any case, the code in DriveSetup should not be changed at all. I hope I have explained why I think the change needs to be in BColumnListView. The DriveSetup code cares about the ''selection''. The selection in the graphical view of the partitions and the selection in the list view should be in sync. The "focus row" is something that DriveSetup does not care about. It should not have to set the focus row, because that indirectly also sets the selection. The focus row is something which the list view cares about and it relates to keyboard navigation. Since it makes sense that the focus row is synced with the selection, then it is the job of BColumnListView to sync it when the selection changes. Just as it already changes the selection when someone programmatically changes the focus row. 5 8 6