From 0ac42882cbf0cd6bfaab7ee8576ea73eb6e92936 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Sat, 21 Mar 2015 16:26:27 +0100 Subject: Fix GTK3 build (typo). (bzr r14024) --- src/ui/widget/page-sizer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/ui/widget/page-sizer.cpp b/src/ui/widget/page-sizer.cpp index 8c86daea0..0a5697661 100644 --- a/src/ui/widget/page-sizer.cpp +++ b/src/ui/widget/page-sizer.cpp @@ -495,7 +495,7 @@ PageSizer::PageSizer(Registry & _wr) _viewboxW.set_hexpand(); _viewboxW.set_vexpand(); - _viewboxTable.attach(_viewbox, 0, 1, 1, 1); + _viewboxTable.attach(_viewboxW, 0, 1, 1, 1); _viewboxH.set_hexpand(); _viewboxH.set_vexpand(); -- cgit v1.2.3 From b13875d6c37d2a5a6857d7fd06ce0661f86a1c8e Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Cenoz Date: Sat, 21 Mar 2015 20:21:53 +0100 Subject: Cleanup headers in BSpline LPE (bzr r14025) --- src/live_effects/lpe-bspline.cpp | 44 ++++++---------------------------------- src/live_effects/lpe-bspline.h | 3 +-- 2 files changed, 7 insertions(+), 40 deletions(-) (limited to 'src') diff --git a/src/live_effects/lpe-bspline.cpp b/src/live_effects/lpe-bspline.cpp index b924d8a23..dba501f42 100644 --- a/src/live_effects/lpe-bspline.cpp +++ b/src/live_effects/lpe-bspline.cpp @@ -1,48 +1,16 @@ /* * Released under GNU GPL, read the file 'COPYING' for more information */ - -#ifdef HAVE_CONFIG_H -# include -#endif - #include - -#if WITH_GLIBMM_2_32 -# include -#endif - -#include -#include - - -#include "display/curve.h" -#include <2geom/bezier-curve.h> -#include <2geom/point.h> -#include "helper/geom-curves.h" #include "live_effects/lpe-bspline.h" -#include "live_effects/lpeobject.h" -#include "live_effects/parameter/parameter.h" #include "ui/widget/scalar.h" -#include "xml/repr.h" -#include "svg/svg.h" +#include "display/curve.h" +#include "helper/geom-curves.h" #include "sp-path.h" -#include "style.h" -#include "document-private.h" -#include "document.h" -#include "document-undo.h" -#include "verbs.h" -#include "sp-lpe-item.h" -#include "sp-namedview.h" -#include "display/sp-canvas.h" -#include -#include -#include "util/units.h" -// For handling un-continuous paths: -#include "message-stack.h" -#include "inkscape.h" - -using Inkscape::DocumentUndo; +#include "svg/svg.h" +#include "xml/repr.h" +// TODO due to internal breakage in glibmm headers, this must be last: +#include namespace Inkscape { namespace LivePathEffect { diff --git a/src/live_effects/lpe-bspline.h b/src/live_effects/lpe-bspline.h index 642562b24..8017e39ef 100644 --- a/src/live_effects/lpe-bspline.h +++ b/src/live_effects/lpe-bspline.h @@ -6,9 +6,8 @@ * * Released under GNU GPL, read the file 'COPYING' for more information */ - #include "live_effects/effect.h" -#include "live_effects/parameter/bool.h" + #include namespace Inkscape { -- cgit v1.2.3 From 06adc7b92c491fb3eaa6a6be2a8bb0e940c8ba81 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Cenoz Date: Sat, 21 Mar 2015 22:23:39 +0100 Subject: Fix a bug in multi-path-manipulator and finish bspline refactor (bzr r14026) --- src/ui/tool/multi-path-manipulator.h | 2 +- src/ui/tool/path-manipulator.cpp | 26 +++++++++++--------------- src/ui/tool/path-manipulator.h | 2 +- 3 files changed, 13 insertions(+), 17 deletions(-) (limited to 'src') diff --git a/src/ui/tool/multi-path-manipulator.h b/src/ui/tool/multi-path-manipulator.h index cdbf34e9d..1bbcdd7ec 100644 --- a/src/ui/tool/multi-path-manipulator.h +++ b/src/ui/tool/multi-path-manipulator.h @@ -39,7 +39,7 @@ public: virtual bool event(Inkscape::UI::Tools::ToolBase *, GdkEvent *event); bool empty() { return _mmap.empty(); } - unsigned size() { return _mmap.empty(); } + unsigned size() { return _mmap.size(); } void setItems(std::set const &); void clear() { _mmap.clear(); } void cleanup(); diff --git a/src/ui/tool/path-manipulator.cpp b/src/ui/tool/path-manipulator.cpp index 8b735f3e6..b1e4d641e 100644 --- a/src/ui/tool/path-manipulator.cpp +++ b/src/ui/tool/path-manipulator.cpp @@ -11,6 +11,7 @@ */ #include "live_effects/lpe-powerstroke.h" +#include "live_effects/lpe-bspline.h" #include "live_effects/lpe-fillet-chamfer.h" #include #include @@ -43,7 +44,6 @@ #include "ui/tool/multi-path-manipulator.h" #include "xml/node.h" #include "xml/node-observer.h" -#include "live_effects/lpe-bspline.h" namespace Inkscape { namespace UI { @@ -151,7 +151,7 @@ PathManipulator::PathManipulator(MultiPathManipulator &mpm, SPPath *path, _createControlPointsFromGeometry(); //Define if the path is BSpline on construction - isBSpline(true); + recalculateIsBSpline(); } PathManipulator::~PathManipulator() @@ -1238,22 +1238,18 @@ int PathManipulator::BSplineGetSteps() const { } // determines if the trace has bspline effect -bool PathManipulator::isBSpline(bool recalculate){ - if(recalculate){ - SPLPEItem * path = dynamic_cast(_path); - if (path){ - if(path->hasPathEffect()){ - Inkscape::LivePathEffect::Effect const *thisEffect = path->getPathEffectOfType(Inkscape::LivePathEffect::BSPLINE); - if(thisEffect){ - _is_bspline = true; - return _is_bspline; - } +void PathManipulator::recalculateIsBSpline(){ + SPLPEItem * path = dynamic_cast(_path); + if (path){ + if(path->hasPathEffect()){ + Inkscape::LivePathEffect::Effect const *thisEffect = path->getPathEffectOfType(Inkscape::LivePathEffect::BSPLINE); + if(thisEffect){ + _is_bspline = true; + return; } } - } _is_bspline = false; - return _is_bspline; } bool PathManipulator::isBSpline() const { @@ -1325,7 +1321,7 @@ void PathManipulator::_createGeometryFromControlPoints(bool alert_LPE) { Geom::PathBuilder builder; //Refresh if is bspline some times -think on path change selection, this value get lost - isBSpline(true); + recalculateIsBSpline(); for (std::list::iterator spi = _subpaths.begin(); spi != _subpaths.end(); ) { SubpathPtr subpath = *spi; if (subpath->empty()) { diff --git a/src/ui/tool/path-manipulator.h b/src/ui/tool/path-manipulator.h index 4badec569..6dc1c9d09 100644 --- a/src/ui/tool/path-manipulator.h +++ b/src/ui/tool/path-manipulator.h @@ -107,7 +107,7 @@ private: void _createControlPointsFromGeometry(); - bool isBSpline(bool recalculate); + void recalculateIsBSpline(); bool isBSpline() const; double BSplineHandlePosition(Handle *h, Handle *h2 = NULL); Geom::Point BSplineHandleReposition(Handle *h, Handle *h2 = NULL); -- cgit v1.2.3