diff options
| author | bulia byak <buliabyak@gmail.com> | 2007-03-25 02:01:37 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2007-03-25 02:01:37 +0000 |
| commit | 3088231d566cc23a92e9c980b28dd99533f5036b (patch) | |
| tree | 2174418ac936dd088c93cb4240ace9b0bc8a4ec2 /src/gradient-chemistry.cpp | |
| parent | updated creative commons licenses to 3.0 and fixed public domain uri (diff) | |
| download | inkscape-3088231d566cc23a92e9c980b28dd99533f5036b.tar.gz inkscape-3088231d566cc23a92e9c980b28dd99533f5036b.zip | |
fix live dragging of gradient midstops, and fix crash when dragging writes to repr
(bzr r2751)
Diffstat (limited to 'src/gradient-chemistry.cpp')
| -rw-r--r-- | src/gradient-chemistry.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gradient-chemistry.cpp b/src/gradient-chemistry.cpp index 0a312193d..5ed49b2ab 100644 --- a/src/gradient-chemistry.cpp +++ b/src/gradient-chemistry.cpp @@ -799,6 +799,7 @@ sp_item_gradient_set_coords (SPItem *item, guint point_type, guint point_i, NR:: case POINT_LG_MID: { // using X-coordinates only to determine the offset, assuming p has been snapped to the vector from begin to end. + sp_gradient_ensure_vector(gradient); double offset = get_offset_between_points (p, NR::Point(lg->x1.computed, lg->y1.computed), NR::Point(lg->x2.computed, lg->y2.computed)); SPGradient *vector = sp_gradient_get_vector (lg, false); lg->vector.stops.at(point_i).offset = offset; @@ -807,7 +808,7 @@ sp_item_gradient_set_coords (SPItem *item, guint point_type, guint point_i, NR:: if (write_repr) { sp_repr_set_css_double(SP_OBJECT_REPR(stopi), "offset", stopi->offset); } else { - SP_OBJECT (gradient)->requestModified(SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG); + SP_OBJECT (stopi)->requestModified(SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG); } } break; |
