diff options
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/sdr/contact/viewcontact.cxx | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/svx/source/sdr/contact/viewcontact.cxx b/svx/source/sdr/contact/viewcontact.cxx index 3c1c875acba3..3f13933b742d 100644 --- a/svx/source/sdr/contact/viewcontact.cxx +++ b/svx/source/sdr/contact/viewcontact.cxx @@ -101,7 +101,9 @@ void ViewContact::RemoveViewObjectContact(ViewObjectContact& rVOContact) maViewObjectContactVector.begin(), maViewObjectContactVector.end(), &rVOContact); if (aFindResult != maViewObjectContactVector.end()) + { maViewObjectContactVector.erase(aFindResult); + } } // Test if this ViewContact has ViewObjectContacts at all. This can @@ -223,6 +225,9 @@ void ViewContact::createViewIndependentPrimitive2DSequence( void ViewContact::getViewIndependentPrimitive2DContainer( drawinglayer::primitive2d::Primitive2DDecompositionVisitor& rVisitor) const { + /* Local up-to-date checks. Create new list and compare. + We cannot just always use the new data because the old data has cached bitmaps in it e.g. see the document in tdf#146108. + */ drawinglayer::primitive2d::Primitive2DContainer xNew; createViewIndependentPrimitive2DSequence(xNew); @@ -232,7 +237,14 @@ void ViewContact::getViewIndependentPrimitive2DContainer( xNew = embedToObjectSpecificInformation(std::move(xNew)); } - rVisitor.visit(xNew); + if (mxViewIndependentPrimitive2DSequence != xNew) + { + // has changed, copy content + const_cast<ViewContact*>(this)->mxViewIndependentPrimitive2DSequence = std::move(xNew); + } + + // return current Primitive2DContainer + rVisitor.visit(mxViewIndependentPrimitive2DSequence); } // add Gluepoints (if available) |