summaryrefslogtreecommitdiffstats
path: root/src/rubberband.cpp
diff options
context:
space:
mode:
authorMaximilian Albert <maximilian.albert@gmail.com>2008-08-14 21:35:32 +0000
committercilix42 <cilix42@users.sourceforge.net>2008-08-14 21:35:32 +0000
commit8e0ceb0c448765b151744838e67e9e2bcdaa0ba3 (patch)
treeff380858187aad25d049ac97f682b97f9f4447c0 /src/rubberband.cpp
parentGet rid of a whole bunch of further instances of SP_ACTIVE_DESKTOP (where the... (diff)
downloadinkscape-8e0ceb0c448765b151744838e67e9e2bcdaa0ba3.tar.gz
inkscape-8e0ceb0c448765b151744838e67e9e2bcdaa0ba3.zip
Removal of SP_ACTIVE_DESKTOP, next take
(bzr r6630)
Diffstat (limited to 'src/rubberband.cpp')
-rw-r--r--src/rubberband.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/rubberband.cpp b/src/rubberband.cpp
index 73333a555..bfe73a43d 100644
--- a/src/rubberband.cpp
+++ b/src/rubberband.cpp
@@ -14,7 +14,6 @@
#include "display/sodipodi-ctrlrect.h"
#include "desktop.h"
-#include "inkscape.h"
#include "desktop-handles.h"
#include "rubberband.h"
#include "display/canvas-bpath.h"
@@ -23,8 +22,8 @@
Inkscape::Rubberband *Inkscape::Rubberband::_instance = NULL;
-Inkscape::Rubberband::Rubberband()
- : _desktop(SP_ACTIVE_DESKTOP), _rect(NULL), _touchpath(NULL), _started(false)
+Inkscape::Rubberband::Rubberband(SPDesktop *dt)
+ : _desktop(dt), _rect(NULL), _touchpath(NULL), _started(false)
{
_points.clear();
_mode = RUBBERBAND_MODE_RECT;
@@ -135,10 +134,10 @@ boost::optional<NR::Rect> Inkscape::Rubberband::getRectangle() const
return NR::Rect(_start, _end);
}
-Inkscape::Rubberband *Inkscape::Rubberband::get()
+Inkscape::Rubberband *Inkscape::Rubberband::get(SPDesktop *desktop)
{
if (_instance == NULL) {
- _instance = new Inkscape::Rubberband;
+ _instance = new Inkscape::Rubberband(desktop);
}
return _instance;