diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2015-03-31 11:50:29 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2015-03-31 11:50:29 +0000 |
| commit | 842a3a6415e837f502671ff098525bba9d8a0362 (patch) | |
| tree | faaef3c3d88abdd5aac551c25e70ecb5850abb8e /src | |
| parent | change pointwise comment (diff) | |
| download | inkscape-842a3a6415e837f502671ff098525bba9d8a0362.tar.gz inkscape-842a3a6415e837f502671ff098525bba9d8a0362.zip | |
Remove active desktop calls from LPE
(bzr r13645.1.60)
Diffstat (limited to 'src')
| -rw-r--r-- | src/live_effects/lpe-fillet-chamfer.cpp | 11 | ||||
| -rw-r--r-- | src/live_effects/parameter/satellitepairarray.cpp | 4 | ||||
| -rw-r--r-- | src/live_effects/parameter/satellitepairarray.h | 6 |
3 files changed, 10 insertions, 11 deletions
diff --git a/src/live_effects/lpe-fillet-chamfer.cpp b/src/live_effects/lpe-fillet-chamfer.cpp index 0502a4192..0f767435f 100644 --- a/src/live_effects/lpe-fillet-chamfer.cpp +++ b/src/live_effects/lpe-fillet-chamfer.cpp @@ -16,9 +16,6 @@ #include "live_effects/lpe-fillet-chamfer.h" -#include "live_effects/lpeobject.h" -#include <sp-shape.h> -#include <sp-path.h> #include <2geom/pointwise.h> #include <2geom/satellite.h> #include <2geom/satellite-enum.h> @@ -28,7 +25,7 @@ #include "helper/geom-curves.h" #include "helper/geom.h" #include "display/curve.h" -#include "ui/tools-switch.h" +#include "knotholder.h" #include <vector> // TODO due to internal breakage in glibmm headers, this must be last: #include <glibmm/i18n.h> @@ -260,10 +257,8 @@ void LPEFilletChamfer::inverseChamfer() void LPEFilletChamfer::refreshKnots() { - SPDesktop *desktop = SP_ACTIVE_DESKTOP; - if (tools_isactive(desktop, TOOLS_NODES)) { - tools_switch(desktop, TOOLS_SELECT); - tools_switch(desktop, TOOLS_NODES); + if(satellitepairarrayparam_values.knoth){ + satellitepairarrayparam_values.knoth->update_knots(); } } diff --git a/src/live_effects/parameter/satellitepairarray.cpp b/src/live_effects/parameter/satellitepairarray.cpp index 3876dc8df..dd67be6a1 100644 --- a/src/live_effects/parameter/satellitepairarray.cpp +++ b/src/live_effects/parameter/satellitepairarray.cpp @@ -29,7 +29,8 @@ SatellitePairArrayParam::SatellitePairArrayParam( const Glib::ustring &label, const Glib::ustring &tip, const Glib::ustring &key, Inkscape::UI::Widget::Registry *wr, Effect *effect) - : ArrayParam<std::pair<size_t,Geom::Satellite> >(label, tip, key, wr, effect, 0) + : ArrayParam<std::pair<size_t,Geom::Satellite> >(label, tip, key, wr, effect, 0), + knoth(NULL) { knot_shape = SP_KNOT_SHAPE_DIAMOND; knot_mode = SP_KNOT_MODE_XOR; @@ -271,6 +272,7 @@ void SatellitePairArrayParam::addKnotHolderEntities(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item) { + knoth = knotholder; addKnotHolderEntities(knotholder, desktop, item, true); } diff --git a/src/live_effects/parameter/satellitepairarray.h b/src/live_effects/parameter/satellitepairarray.h index 462f1017c..fcd3bd736 100644 --- a/src/live_effects/parameter/satellitepairarray.h +++ b/src/live_effects/parameter/satellitepairarray.h @@ -62,7 +62,9 @@ public: virtual void updateCanvasIndicators(bool mirror); void set_pointwise(Geom::Pointwise *pointwise); friend class FilletChamferKnotHolderEntity; - + friend class LPEFilletChamfer; +protected: + KnotHolder *knoth; private: SatellitePairArrayParam(const SatellitePairArrayParam &); SatellitePairArrayParam &operator=(const SatellitePairArrayParam &); @@ -83,7 +85,7 @@ private: class FilletChamferKnotHolderEntity : public KnotHolderEntity { public: FilletChamferKnotHolderEntity(SatellitePairArrayParam *p, size_t index); - virtual ~FilletChamferKnotHolderEntity() {} + virtual ~FilletChamferKnotHolderEntity() {_pparam->knoth = NULL;} virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state); virtual Geom::Point knot_get() const; |
