• Boudewijn Rempt's avatar
    Delete KisView on closing a view. · 6f614b5f
    Boudewijn Rempt authored
    This first makes KoCanvasBase a QObject; that used to be impossible
    because other calligra applications canvas classes multiply inherited
    QWidget and KoCanvasBase. That is no longer a consideration.
    
    Then every local use of a pointer to KoCanvasBase or KisCanvas2 is
    protected by QPointer. Now every canvas observer knows when a canvas
    has disappeared.
    
    But the canvas is deleted before the canvascontroller widget; that means
    that when deleting the canvas, the canvas controller widget would get
    confused because the canvas observers' canvas has already been deleted:
    unsetCanvas wouldn't be called on the canvas observers, so the logic here
    is now that if unsetCanvas is called when deleting the canvas controller
    widget, unsetCanvas is always called on all observers.
    
    Note: no dockers crash even if unsetCanvas isn't called at the right time,
    but it's still proper to call unsetCanvas to allow dockers to clean up
    things like local models linked to the layer model.
    6f614b5f
kis_paintop_transformation_connector.h 1.33 KB