They are horrible. We need a better solution. The
"smart" layout was the wrong solution and everyone
hated them.
We need some ideas about how this should work.
Need to call QTMovie::invalidate before QTMovieView::setMovie to
ensure the mmap is deleted before allocating for the new one. This
fixes mmap errors when scrolling up and down a list of videos.
When resizing windows in tile view the update is a bit
wonky when you have a video window on screen. The layout
code now repaints the entire homewindow when one of the
charts are resized.
The tile view will now layout the charts in a more efficient
manner. It still attempts to run from top to bottom and then
left to right when laying out charts, but now, if there is
any space and the chart will fit in it, it will be moved.
This means you can layout the view with smaller charts surrounding
or to the left of right of a larger one. This is particularly
useful when looking at say a large summary window with a smaller
map and a route profile etc.
It can be a little disconcerting however, since charts will
suddenly 'disappear' when you resize them -- of course they
don't disappear they just move to a space that can accomodate
them.
We could make 'smart' layouts optional if users get thrown by it.
Lastly, fixed a bug when resizing charts -- if they move position
when resizing then the delta (size change) is miscalculated. This
is avoided now by ending any resize action when a chart moves.
Fixes#453.
The previous commit enabling tile 'bumping' as
you move them around proved impractical with
charts that largely filled the screen.
This patch replaces this approach (original code
is retained though) by using a 'cursor' to show
where charts will be dropped / moved to and moving
or dropping to this position.
This means the layout code is complete, except for
potentially adding support for multiple layouts (e.g.
have saved layouts for different purposes like
LTM charts for last 6 months or 28 days or an
agenda view that shows past week next week calendar).