From: jaspervdg Date: Tue, 21 Apr 2009 14:25:51 +0000 (+0000) Subject: When reworking Preben's patch I forgot a few things (oops). X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=fb5a7ba023a314d8b8085d95e10eac8f4da17172;p=inkscape.git When reworking Preben's patch I forgot a few things (oops). --- 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;