summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJasper van de Gronde <jasper.vandegronde@gmail.com>2009-04-21 14:25:51 +0000
committerjaspervdg <jaspervdg@users.sourceforge.net>2009-04-21 14:25:51 +0000
commit49610e88e5e97ad4f37cf3b062c91bd72867617b (patch)
treebff7efd36715d49e7f92f2cff11dde027d3f2c1a /src
parentPartial fix for bug 193926 , thanks to Preben Soeberg. (diff)
downloadinkscape-49610e88e5e97ad4f37cf3b062c91bd72867617b.tar.gz
inkscape-49610e88e5e97ad4f37cf3b062c91bd72867617b.zip
When reworking Preben's patch I forgot a few things (oops).
(bzr r7753)
Diffstat (limited to 'src')
-rw-r--r--src/filters/convolvematrix.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/filters/convolvematrix.cpp b/src/filters/convolvematrix.cpp
index a5a40811c..5cda2a139 100644
--- a/src/filters/convolvematrix.cpp
+++ b/src/filters/convolvematrix.cpp
@@ -191,8 +191,10 @@ sp_feConvolveMatrix_set(SPObject *object, unsigned int key, gchar const *value)
read_num = helperfns_read_number(value);
if (read_num == 0) {
// This should actually be an error, but given our UI it is more useful to simply set divisor to the default.
- for (unsigned int i = 0; i< feConvolveMatrix->kernelMatrix.size(); i++)
- read_num += feConvolveMatrix->kernelMatrix[i];
+ if (feConvolveMatrix->kernelMatrixIsSet) {
+ for (unsigned int i = 0; i< feConvolveMatrix->kernelMatrix.size(); i++)
+ read_num += feConvolveMatrix->kernelMatrix[i];
+ }
if (read_num == 0) read_num = 1;
if (feConvolveMatrix->divisorIsSet || feConvolveMatrix->divisor!=read_num) {
feConvolveMatrix->divisorIsSet = false;
@@ -202,6 +204,7 @@ sp_feConvolveMatrix_set(SPObject *object, unsigned int key, gchar const *value)
} else if (!feConvolveMatrix->divisorIsSet || feConvolveMatrix->divisor!=read_num) {
feConvolveMatrix->divisorIsSet = true;
feConvolveMatrix->divisor = read_num;
+ object->parent->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
}
break;