Code

* src/Makefile_insert, src/Makefile.am, src/svg/Makefile_insert,
[inkscape.git] / src / rubberband.cpp
index dd16a62d841fd5b18cdfbd3703b3ea2fadd3f274..cc0e70a7444c564dc72cacd8e58f3288b33ead26 100644 (file)
 
 #include "display/sodipodi-ctrlrect.h"
 #include "desktop.h"
+#include "inkscape.h"
 #include "desktop-handles.h"
 #include "rubberband.h"
 
 Inkscape::Rubberband *Inkscape::Rubberband::_instance = NULL;
 
 Inkscape::Rubberband::Rubberband()
-    : _desktop(NULL), _canvas(NULL)
+    : _desktop(SP_ACTIVE_DESKTOP), _canvas(NULL)
 {
 
 }
@@ -43,7 +44,7 @@ void Inkscape::Rubberband::stop()
 void Inkscape::Rubberband::move(NR::Point const &p)
 {
     if (_canvas == NULL) {
-        _canvas = static_cast<CtrlRect *>(sp_canvas_item_new(SP_DT_CONTROLS(_desktop), SP_TYPE_CTRLRECT, NULL));
+        _canvas = static_cast<CtrlRect *>(sp_canvas_item_new(sp_desktop_controls(_desktop), SP_TYPE_CTRLRECT, NULL));
     }
 
     _desktop->scroll_to_point(&p);