summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 09dfce9)
raw | patch | inline | side by side (parent: 09dfce9)
author | jaspervdg <jaspervdg@users.sourceforge.net> | |
Tue, 21 Apr 2009 14:25:51 +0000 (14:25 +0000) | ||
committer | jaspervdg <jaspervdg@users.sourceforge.net> | |
Tue, 21 Apr 2009 14:25:51 +0000 (14:25 +0000) |
src/filters/convolvematrix.cpp | patch | blob | history |
index a5a40811c6d14df094703618d0c06bd65f5463cc..5cda2a1391f96a7317c69ac00dfe53db6b112404 100644 (file)
@@ -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;
} else if (!feConvolveMatrix->divisorIsSet || feConvolveMatrix->divisor!=read_num) {
feConvolveMatrix->divisorIsSet = true;
feConvolveMatrix->divisor = read_num;
+ object->parent->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
}
break;