Opened 14 years ago

Closed 11 years ago

#6756 closed bug (fixed)

Updating status view after mouse click [easy]

Reported by: humdinger Owned by: stpere
Priority: low Milestone: R1
Component: Applications/DiskUsage Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

This is hrev39138.

Do this:

  • Open DiskUsage and scan /boot
  • Click once in the middle to change to "boot"
  • Move the mouse to the segment /boot/common
  • Without moving the mouse, click once

--> Even though you're now in /boot/common and the mouse rests on another segment, /boot/common/var, this isn't reflected in the status view. Only after you've moved the mouse it's updated.

Change History (4)

comment:1 by stippi, 14 years ago

Priority: normallow
Summary: Updating status view after mouse clickUpdating status view after mouse click [easy]

This kind of bug is very common in many applications. Didn't check this lately, but until very recently, if you scrolled via mouse wheel in Safari, and you happened to point at a link after scrolling, the mouse shape was not adjusted and the status bar would not show the link target... until you slightly moved the mouse. An easy fix is to call MouseMoved() on the view after changing the contents, in order to trigger the evaluation again and reuse the code paths that are already there. In some applications, it's possible to introduce busy loops (cycles) this way, but I don't think one has to watch out for this in DiskUsage. To be extra tidy, one could refactor the code which is currently in MouseMoved() into a private _MouseMoved(), and call that one from both locations.

comment:2 by stippi, 14 years ago

Thinking about it, call the private one _EvaluateClickTarget() or something like that.

comment:3 by stpere, 13 years ago

I did some initial investigation regarding this issue and noticed that it won't be that simple. For the simple reason that the file list, used to know which file is under the mouse, is built in the draw operation. so, you can't call MouseMoved() as soon as you would like to (right after changing the folder in MouseUp() for example) and update the info panel, you will have to build that list again (or wait for a draw to occur). I hope it makes sense. I will do further work on this issue later.

comment:4 by stpere, 11 years ago

Resolution: fixed
Status: newclosed

should be fixed in hrev44839.

Note: See TracTickets for help on using tickets.