summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2015-03-10 19:20:02 +0000
committerJabiertxof <jtx@jtx.marker.es>2015-03-10 19:20:02 +0000
commit52c0042e1daeb6645ae4d479b92bae26944c0161 (patch)
tree133e7dcb20b622d74dfcccfb5cd1add44ae407f8 /src
parentRemove redundant buttons on simplify LPE (diff)
downloadinkscape-52c0042e1daeb6645ae4d479b92bae26944c0161.tar.gz
inkscape-52c0042e1daeb6645ae4d479b92bae26944c0161.zip
This commit remove all ocurrences of Active Desktop casts and all tool swith on Perspective/Envelope and in Lattice 2, also remove some casts from point parameter
(bzr r13987)
Diffstat (limited to 'src')
-rw-r--r--src/live_effects/lpe-lattice2.cpp6
-rw-r--r--src/live_effects/lpe-perspective-envelope.cpp8
-rw-r--r--src/live_effects/parameter/point.cpp11
3 files changed, 5 insertions, 20 deletions
diff --git a/src/live_effects/lpe-lattice2.cpp b/src/live_effects/lpe-lattice2.cpp
index 1bcbe286f..affa039fa 100644
--- a/src/live_effects/lpe-lattice2.cpp
+++ b/src/live_effects/lpe-lattice2.cpp
@@ -32,9 +32,6 @@
#include <2geom/d2.h>
#include <2geom/piecewise.h>
#include <2geom/transforms.h>
-#include "ui/tools-switch.h"
-
-#include "desktop.h" // TODO: should be factored out (see below)
using namespace Geom;
@@ -396,9 +393,6 @@ LPELattice2::resetGrid()
grid_point32x33x34x35.param_set_and_write_default();
//todo:this hack is only to reposition the knots on reser grid button
//Better update path effect in LPEITEM
- SPDesktop * desktop = SP_ACTIVE_DESKTOP;
- tools_switch(desktop, TOOLS_SELECT);
- tools_switch(desktop, TOOLS_NODES);
}
void
diff --git a/src/live_effects/lpe-perspective-envelope.cpp b/src/live_effects/lpe-perspective-envelope.cpp
index d38427d0a..74c870498 100644
--- a/src/live_effects/lpe-perspective-envelope.cpp
+++ b/src/live_effects/lpe-perspective-envelope.cpp
@@ -19,9 +19,8 @@
#include "helper/geom.h"
#include "display/curve.h"
#include "svg/svg.h"
-#include "ui/tools-switch.h"
#include <gsl/gsl_linalg.h>
-#include "desktop.h"
+
using namespace Geom;
@@ -335,11 +334,6 @@ LPEPerspectiveEnvelope::resetGrid()
Up_Right_Point.param_set_and_write_default();
Down_Right_Point.param_set_and_write_default();
Down_Left_Point.param_set_and_write_default();
- //todo:this hack is only to reposition the knots on reser grid button
- //Better update path effect in LPEITEM
- SPDesktop * desktop = SP_ACTIVE_DESKTOP;
- tools_switch(desktop, TOOLS_SELECT);
- tools_switch(desktop, TOOLS_NODES);
}
void
diff --git a/src/live_effects/parameter/point.cpp b/src/live_effects/parameter/point.cpp
index 1d48bda8d..83e7e8f62 100644
--- a/src/live_effects/parameter/point.cpp
+++ b/src/live_effects/parameter/point.cpp
@@ -113,13 +113,6 @@ void
PointParam::param_setValue(Geom::Point newpoint)
{
*dynamic_cast<Geom::Point *>( this ) = newpoint;
- if(SP_ACTIVE_DESKTOP){
- SPDesktop* desktop = SP_ACTIVE_DESKTOP;
- if (tools_isactive( desktop, TOOLS_NODES)) {
- Inkscape::UI::Tools::NodeTool *nt = static_cast<Inkscape::UI::Tools::NodeTool*>( desktop->event_context);
- nt->update_helperpath();
- }
- }
}
void
@@ -130,6 +123,10 @@ PointParam::param_set_and_write_new_value (Geom::Point newpoint)
gchar * str = g_strdup(os.str().c_str());
param_write_to_repr(str);
g_free(str);
+ SPLPEItem* item = reinterpret_cast<SPLPEItem*>(param_effect->getLPEObj());
+ if(item){
+ sp_lpe_item_update_patheffect(item, false, false);
+ }
}
void