summaryrefslogtreecommitdiffstats
path: root/src/sp-ellipse.cpp
diff options
context:
space:
mode:
authorJabiertxof <jtx@jtx>2017-05-29 00:09:29 +0000
committerJabiertxof <jtx@jtx>2017-05-29 00:09:29 +0000
commit5151c0569bb266461c3b6a6325c0d4be60b41a67 (patch)
treec88082a30788888ff942b63e6c2cfadbf68ccf07 /src/sp-ellipse.cpp
parentFix bug on crash if undefined LPE load (diff)
downloadinkscape-5151c0569bb266461c3b6a6325c0d4be60b41a67.tar.gz
inkscape-5151c0569bb266461c3b6a6325c0d4be60b41a67.zip
Fix bug #1694111 also fixes noumerous bugfixes on LPE undo. And shapes are improved to only perform path effet one time each
Fixed bugs: - https://launchpad.net/bugs/1694111 (bzr r15713)
Diffstat (limited to 'src/sp-ellipse.cpp')
-rw-r--r--src/sp-ellipse.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/sp-ellipse.cpp b/src/sp-ellipse.cpp
index 5dfc60f1a..30c1096ca 100644
--- a/src/sp-ellipse.cpp
+++ b/src/sp-ellipse.cpp
@@ -408,7 +408,7 @@ const char *SPGenericEllipse::displayName() const
}
// Create path for rendering shape on screen
-void SPGenericEllipse::set_shape()
+void SPGenericEllipse::set_shape(bool force)
{
// std::cout << "SPGenericEllipse::set_shape: Entrance" << std::endl;
if (hasBrokenPathEffect()) {
@@ -475,6 +475,12 @@ void SPGenericEllipse::set_shape()
/* Reset the shape's curve to the "original_curve"
* This is very important for LPEs to work properly! (the bbox might be recalculated depending on the curve in shape)*/
+ if(this->getCurveBeforeLPE()) {
+ if(!force && this->getCurveBeforeLPE()->get_pathvector() == curve->get_pathvector()) {
+ curve->unref();
+ return;
+ }
+ }
this->setCurveInsync(curve, TRUE);
this->setCurveBeforeLPE(curve);
@@ -617,7 +623,7 @@ void SPGenericEllipse::modified(guint flags)
void SPGenericEllipse::update_patheffect(bool write)
{
- this->set_shape();
+ this->set_shape(true);
if (write) {
Inkscape::XML::Node *repr = this->getRepr();