spstreets / gtfs_manager

A GUI for viewing and editing GTFS data
MIT License
30 stars 3 forks source link

Resizing window breaks highlighted trip positions #36

Open maxwell8888 opened 2 years ago

maxwell8888 commented 2 years ago

(Mostly) fixed by setting the appropriate flags in .layout() to indicate that paths/circles should be recalucated when window/widget is resized. The problem is that the with current design this requires recreating all the boxed groups, which is far too slow. Really we need to redesign so that paths and boxes are created for some fixed canvas dimensions (eg the bitmap dimensions) and then to draw on the actual widget sized canvas we transform all the paths/circles with the appropriate scale. An easier temporary solution is to simply accept that there will be a delay. This is reasonably fine currently for a single size change, eg hitting full screen, but not suitable for click and drag resizing, need to ensure the only do paths/circles recalculations once the drag resizing if finished to avoid doing it multiple times.