diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2015-03-12 08:19:08 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2015-03-12 08:19:08 +0000 |
| commit | c9a989288ac802c9f7ca65f387827a3c2e991741 (patch) | |
| tree | 603d9ca781e5379f27c45c96da46bb7a1415e240 /src/live_effects/lpe-perspective-envelope.cpp | |
| parent | Allow changing document scale (via changing viewBox). Start of GUI. (diff) | |
| download | inkscape-c9a989288ac802c9f7ca65f387827a3c2e991741.tar.gz inkscape-c9a989288ac802c9f7ca65f387827a3c2e991741.zip | |
Point parameter refactor, Fixes a bug in Lattice2 whith lines.
(bzr r13995)
Diffstat (limited to 'src/live_effects/lpe-perspective-envelope.cpp')
| -rw-r--r-- | src/live_effects/lpe-perspective-envelope.cpp | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/src/live_effects/lpe-perspective-envelope.cpp b/src/live_effects/lpe-perspective-envelope.cpp index e4e75cf4d..f355fa683 100644 --- a/src/live_effects/lpe-perspective-envelope.cpp +++ b/src/live_effects/lpe-perspective-envelope.cpp @@ -20,7 +20,9 @@ #include "display/curve.h" #include "svg/svg.h" #include <gsl/gsl_linalg.h> +#include "ui/tools-switch.h" +#include "desktop.h" // TODO: should be factored out (see below) using namespace Geom; @@ -330,13 +332,23 @@ LPEPerspectiveEnvelope::setDefaults() void LPEPerspectiveEnvelope::resetGrid() { - Up_Left_Point.param_set_and_write_default(); - Up_Right_Point.param_set_and_write_default(); - Down_Right_Point.param_set_and_write_default(); - Down_Left_Point.param_set_and_write_default(); + Up_Left_Point.param_set_default(); + Up_Right_Point.param_set_default(); + Down_Right_Point.param_set_default(); + Down_Left_Point.param_set_default(); + /*todo:this hack is only to reposition the knots on reser grid button + Better update path effect in LPEITEM if(sp_lpe_item){ - sp_lpe_item_update_patheffect(sp_lpe_item, false, false); + sp_lpe_item_update_patheffect(sp_lpe_item, true, true); + SPGroup *group = dynamic_cast<SPGroup *>(sp_lpe_item); + if(group){ + group->requestModified(SP_OBJECT_MODIFIED_FLAG); + } } + */ + SPDesktop * desktop = SP_ACTIVE_DESKTOP; + tools_switch(desktop, TOOLS_SELECT); + tools_switch(desktop, TOOLS_NODES); } void @@ -344,8 +356,8 @@ LPEPerspectiveEnvelope::resetDefaults(SPItem const* item) { Effect::resetDefaults(item); original_bbox(SP_LPE_ITEM(item)); - setDefaults(); resetGrid(); + setDefaults(); } void |
