Annotation: Block adding comment to an annotation shape
ClosedPublic

Authored by danders on Oct 11 2018, 11:47 AM.

Details

Summary

To reproduce crash:

  1. Add a text shape
  2. Add an annotation shape
  3. Activate the annotation shape
  4. Select the Shape Handling tool
  5. Select both shapes; first annotation shape then the text shape
  6. Select the text tool: The caret should now be in the annotation tool
  7. Hit CTRL-SHIFT C to add a comment -> crash

TODO: Find out why disabling insert_annotation action is not working

Closes T4902

Diff Detail

Repository
R8 Calligra
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
danders created this revision.Oct 11 2018, 11:47 AM
Restricted Application added a project: Calligra: 3.0. · View Herald TranscriptOct 11 2018, 11:47 AM
Restricted Application added a subscriber: Calligra-Devel-list. · View Herald Transcript
danders requested review of this revision.Oct 11 2018, 11:47 AM
plugins/textshape/TextTool.cpp
2036

If it has more than one shape that not satisfy above condition (2032) m_textShape will point to last one, not to first as current behavior. So maybe

if (!m_textShape) {
    m_textShape = textShape;
}

It will point to first when it does not have exactly match.

3123

Can m_textShape be a nullptr ?

danders marked an inline comment as done.Oct 11 2018, 12:27 PM

No, it should not be possible to activate a tool without a shape.

danders updated this revision to Diff 43721.Oct 16 2018, 10:01 AM
  • DefaultTool: Do not considder parent flags when checking Move-/ResizeAllowd
  • DefaultTool: MoveStrategy: Check if shape is movable
  • DefaultTool: ResizeStrategy: Check if shape is resizeable
  • DefaultTool: ShareStrategy: Check if shape is shearable
  • DefaultTool: RotateStrategy: Check if shape rotation is allowed
  • Fix undo/redo of anchored shapes

Arghh, accidentally propt a new diff on top of this, howto undo this?
(arc is fine, but do not do anything wrong)

danders abandoned this revision.Oct 16 2018, 10:13 AM
danders updated this revision to Diff 43724.Oct 16 2018, 10:56 AM
  • If no textshape is editied, select the first found text shape

Looks good to me +1

This revision was not accepted when it landed; it landed in state Needs Review.Oct 16 2018, 11:53 AM
This revision was automatically updated to reflect the committed changes.