summaryrefslogtreecommitdiffstats
path: root/src/conn-avoid-ref.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/conn-avoid-ref.cpp')
-rw-r--r--src/conn-avoid-ref.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/conn-avoid-ref.cpp b/src/conn-avoid-ref.cpp
index cb72f65dc..c13b9a5d3 100644
--- a/src/conn-avoid-ref.cpp
+++ b/src/conn-avoid-ref.cpp
@@ -32,7 +32,7 @@
#include "xml/node.h"
#include "document.h"
#include "desktop.h"
-#include "desktop-handles.h"
+
#include "document-undo.h"
#include "sp-namedview.h"
#include "sp-item-group.h"
@@ -87,11 +87,11 @@ void SPAvoidRef::setAvoid(char const *value)
void SPAvoidRef::handleSettingChange(void)
{
- SPDesktop *desktop = inkscape_active_desktop();
+ SPDesktop *desktop = SP_ACTIVE_DESKTOP;
if (desktop == NULL) {
return;
}
- if (sp_desktop_document(desktop) != item->document) {
+ if (desktop->getDocument() != item->document) {
// We don't want to go any further if the active desktop's document
// isn't the same as the document that this item is part of. This
// case can happen if a new document is loaded from the file chooser
@@ -277,7 +277,7 @@ static std::vector<Geom::Point> approxItemWithPoints(SPItem const *item, const G
}
static Avoid::Polygon avoid_item_poly(SPItem const *item)
{
- SPDesktop *desktop = inkscape_active_desktop();
+ SPDesktop *desktop = SP_ACTIVE_DESKTOP;
g_assert(desktop != NULL);
double spacing = desktop->namedview->connector_spacing;
@@ -370,7 +370,7 @@ void init_avoided_shape_geometry(SPDesktop *desktop)
{
// Don't count this as changes to the document,
// it is basically just late initialisation.
- SPDocument *document = sp_desktop_document(desktop);
+ SPDocument *document = desktop->getDocument();
bool saved = DocumentUndo::getUndoSensitive(document);
DocumentUndo::setUndoSensitive(document, false);