Diffusion Krita 940651773798

Fix a crash when creating a text shape

Authored by dkazakov on Jun 7 2019, 10:45 AM.

Description

Fix a crash when creating a text shape

Every KoShapeController used to reset the global "shape document" in its
KoDocumentResourceManager. The problem is that in Krita we have multiple
KoShapeController-s, but the resource manager is the only one. It means
that every shape selection or shape layer used to reset the pointer to
the global "shape document" to its own one. The only reason why we didn't
have too many crashes is that almost noone uses this "shape document".

Ideally we should:

  1. Remove KoDocumentResourceManager::GlobalShapeController resource. This resource is not global to the document, but is created per-layer. The only user of it atm is the legacy text tool, which should be deprecated.
  1. Remove KoDocumentResourceManager at all. There is no much use of it anymore. Its main user is legacy text tool.

BUG:407554

Details

Committed
remptJun 13 2019, 5:59 AM
Parents
R37:86caaa72fda9: Don't divide 0 by 0 when trying to load a broken kpl file
Branches
Unknown
Tags
Unknown