Skip to content
Commit 4193f738 authored by Bharadwaj Raju's avatar Bharadwaj Raju
Browse files

Fix crash when clearing annotations after creating a text annotation

If one creates a text annotation, leaves it selected, and annotations are cleared,
the selected action remains the text action, and when the user next tries to make
an annotation, the mousePressEvent handler sees that saWrapper is valid and
tries to call its commitChange, even though the underlying action has been
deleted. This causes a crash.

To prevent this, we call deselectAction in clearAnnotations.

For testing, I recommend trying it with graphics/spectacle!223, which adds a UI for clearing annotations.

cc @ndavis
parent 62348e8d
Pipeline #377430 passed with stage
in 2 minutes and 22 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment