2.12.2021, 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

  • Artur Grunau's avatar
    Fix the redrawing of threaded GL canvases · 5fbb429e
    Artur Grunau authored
    QtThreadedCanvas used to ignore all repaint events send to it by Qt in
    order to avoid problems with threading. As a result, however, it would
    become blank when docked/undocked, and display garbage in those of its
    regions that some other widgets have moved over.
    
    To fix this, the API of TGT's Painter class had to be slightly modified
    and now mirrors that of Canvas with regard to painting-related
    operations. The paint method has been made protected; it's supposed to
    implement the painting logic and shouldn't be called directly. A public
    repaint method has been introduced to let canvases notify their
    associated painters that they need to be redrawn. The default
    implementation simply calls paint() immediately; threaded painters,
    however, override it to schedule render jobs that run in separate
    threads.
    
    All existing threaded painters have been updated to reduce the
    visibility of their paint methods and provide public repaint functions.
    Consequently, QtThreadedCanvas can now properly handle repaint events by
    delegating to its associated painter's repaint method.
    5fbb429e
datacontainerinspectorcanvas.h 7.38 KB