From: johanengelen Date: Sun, 15 Mar 2009 21:01:05 +0000 (+0000) Subject: store default size in lpe::ArrayParam X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a72ec1a2bb8eb1f6aabcb0904c539ee609b716c3;p=inkscape.git store default size in lpe::ArrayParam --- diff --git a/src/live_effects/parameter/array.h b/src/live_effects/parameter/array.h index 4da329c4d..e5f230111 100644 --- a/src/live_effects/parameter/array.h +++ b/src/live_effects/parameter/array.h @@ -33,7 +33,7 @@ public: Inkscape::UI::Widget::Registry* wr, Effect* effect, size_t n = 0 ) - : Parameter(label, tip, key, wr, effect), _vector(n) + : Parameter(label, tip, key, wr, effect), _vector(n), _default_size(n) { } @@ -74,7 +74,7 @@ public: } void param_set_default() { - param_setValue( std::vector() ); + param_setValue( std::vector(_default_size) ); } void param_set_and_write_new_value(std::vector const &new_vector) { @@ -90,6 +90,7 @@ private: ArrayParam& operator=(const ArrayParam&); std::vector _vector; + size_t _default_size; void writesvg(SVGOStringStream &str, std::vector const &vector) const { for (unsigned int i = 0; i < vector.size(); ++i) {