diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2016-11-21 11:34:27 +0000 |
|---|---|---|
| committer | tavmjong-free <tavmjong@free.fr> | 2016-11-21 11:34:27 +0000 |
| commit | b045203981fee53df04a760039ed2730d854f8fd (patch) | |
| tree | e0e5131c8c8dec7ec678acaf65e90a8b8719fd3c /src/ui/tools/mesh-tool.cpp | |
| parent | Fix #1643408. Bug in pap LPE (diff) | |
| download | inkscape-b045203981fee53df04a760039ed2730d854f8fd.tar.gz inkscape-b045203981fee53df04a760039ed2730d854f8fd.zip | |
Keep corner nodes selected when possible for corner operations.
(bzr r15264)
Diffstat (limited to 'src/ui/tools/mesh-tool.cpp')
| -rw-r--r-- | src/ui/tools/mesh-tool.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/ui/tools/mesh-tool.cpp b/src/ui/tools/mesh-tool.cpp index d01837c49..7f05906f4 100644 --- a/src/ui/tools/mesh-tool.cpp +++ b/src/ui/tools/mesh-tool.cpp @@ -355,12 +355,13 @@ sp_mesh_context_corner_operation (MeshTool *rc, MeshCornerOperation operation ) std::map<SPMeshGradient*, std::vector<guint> > points; std::map<SPMeshGradient*, SPItem*> items; - + std::map<SPMeshGradient*, Inkscape::PaintTarget> fill_or_stroke; + // Get list of selected draggers for each mesh. - // For all selected draggers + // For all selected draggers (a dragger may include draggerables from different meshes). for (std::set<GrDragger *>::const_iterator i = drag->selected.begin(); i != drag->selected.end(); ++i) { GrDragger *dragger = *i; - // For all draggables of dragger + // For all draggables of dragger (a draggable corresponds to a unique mesh). for (std::vector<GrDraggable *>::const_iterator j = dragger->draggables.begin(); j != dragger->draggables.end() ; ++j) { GrDraggable *d = *j; @@ -373,6 +374,7 @@ sp_mesh_context_corner_operation (MeshTool *rc, MeshCornerOperation operation ) // Collect points together for same gradient points[gradient].push_back( d->point_i ); items[gradient] = d->item; + fill_or_stroke[gradient] = d->fill_or_stroke ? Inkscape::FOR_FILL: Inkscape::FOR_STROKE; } } @@ -426,6 +428,7 @@ sp_mesh_context_corner_operation (MeshTool *rc, MeshCornerOperation operation ) case MG_CORNER_SIDE_TOGGLE: DocumentUndo::done(doc, SP_VERB_CONTEXT_MESH, _("Toggled mesh path type.")); + drag->local_change = true; // Don't create new draggers. break; case MG_CORNER_SIDE_ARC: @@ -435,16 +438,17 @@ sp_mesh_context_corner_operation (MeshTool *rc, MeshCornerOperation operation ) case MG_CORNER_TENSOR_TOGGLE: DocumentUndo::done(doc, SP_VERB_CONTEXT_MESH, _("Toggled mesh tensors.")); + drag->local_change = true; // Don't create new draggers. break; case MG_CORNER_COLOR_SMOOTH: DocumentUndo::done(doc, SP_VERB_CONTEXT_MESH, _("Smoothed mesh corner color.")); - drag->local_change = true; + drag->local_change = true; // Don't create new draggers. break; case MG_CORNER_COLOR_PICK: DocumentUndo::done(doc, SP_VERB_CONTEXT_MESH, _("Picked mesh corner color.")); - drag->local_change = true; + drag->local_change = true; // Don't create new draggers. break; case MG_CORNER_INSERT: |
