summaryrefslogtreecommitdiffstats
path: root/src/desktop.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2013-07-04 15:27:06 +0000
committerJaviertxo <jtx@jtx.marker.es>2013-07-04 15:27:06 +0000
commitb8ef835cd10460cf7548bae4970b395e9d7767d9 (patch)
tree12e14b42023385cf8bf8192c2ae482a4f59deff1 /src/desktop.cpp
parentIm not sure what changes are (diff)
parentShape calculations. do not quantize the coordinates. (Bug 168158) (diff)
downloadinkscape-b8ef835cd10460cf7548bae4970b395e9d7767d9.tar.gz
inkscape-b8ef835cd10460cf7548bae4970b395e9d7767d9.zip
Upadate to trunk
(bzr r11950.1.122)
Diffstat (limited to 'src/desktop.cpp')
-rw-r--r--src/desktop.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/desktop.cpp b/src/desktop.cpp
index 0bf442b7a..17548ee56 100644
--- a/src/desktop.cpp
+++ b/src/desktop.cpp
@@ -70,6 +70,7 @@
#include "sp-item-group.h"
#include "sp-namedview.h"
#include "sp-root.h"
+#include "sp-defs.h"
#include "widgets/desktop-widget.h"
#include "xml/repr.h"
#include "helper/action.h" //sp_action_perform
@@ -595,6 +596,9 @@ SPObject *SPDesktop::layerForObject(SPObject *object) {
SPObject *root=currentRoot();
object = object->parent;
while ( object && object != root && !isLayer(object) ) {
+ // Objects in defs have no layer and are NOT in the root layer
+ if(SP_IS_DEFS(object))
+ return NULL;
object = object->parent;
}
return object;