rickomax / psxprev

PSXPREV - Playstation (PSX) Files Previewer/Extractor
BSD 2-Clause "Simplified" License
200 stars 10 forks source link

Fix lag when using gizmos on models with limbs #96

Closed trigger-segfault closed 1 year ago

trigger-segfault commented 1 year ago

When using the gizmo to translate a model with lots of connections, the movement wouldn't draw to the panel until letting go of the mouse (or waiting a period of time without movement). This is due to WinForms delaying the paint event until it's not busy, and it was always busy because FixConnections was causing enough lag to keep it occuppied. One solution could have been to call _openTkControl.Refresh() during the gizmo mover updates, but that's a drastic approach, when trying to speed things up would be better approach. Additionally the Refresh solution wouldn't fix other controls, like the property grid not updating.