diff --git a/src/sp-item.cpp b/src/sp-item.cpp
index fb13b1770bf1d36e4fca810003d960c9f7b2110e..2ac480341a4ef469a9194ed439bff6f249a517ea 100644 (file)
--- a/src/sp-item.cpp
+++ b/src/sp-item.cpp
#include "sp-item-rm-unsatisfied-cns.h"
#include "sp-pattern.h"
#include "sp-switch.h"
+#include "sp-guide-constraint.h"
#include "gradient-chemistry.h"
#include "preferences.h"
#include "conn-avoid-ref.h"
this->avoidRef = new SPAvoidRef(this);
+ new (&this->constraints) std::vector<SPGuideConstraint>();
+
new (&this->_transformed_signal) sigc::signal<void, Geom::Matrix const *, SPItem *>();
}
@@ -970,7 +973,7 @@ void sp_item_snappoints(SPItem const *item, SnapPointsIter p, Inkscape::SnapPref
// Get the snappoints at the item's center
if (snapprefs != NULL && snapprefs->getIncludeItemCenter()) {
- *p = item->getCenter();
+ *p = item->getCenter();
}
// Get the snappoints of clipping paths and mask, if any
g_free (s);
s = snew;
}
- if (SP_OBJECT_STYLE(item) && SP_OBJECT_STYLE(item)->filter.href) {
- gchar *snew = g_strdup_printf (_("%s; <i>filtered</i>"), s);
+ if (SP_OBJECT_STYLE(item) && SP_OBJECT_STYLE(item)->filter.href && SP_OBJECT_STYLE(item)->filter.href->getObject()) {
+ const gchar *label = SP_OBJECT_STYLE(item)->filter.href->getObject()->label();
+ gchar *snew;
+ if (label) {
+ snew = g_strdup_printf (_("%s; <i>filtered (%s)</i>"), s, label);
+ } else {
+ snew = g_strdup_printf (_("%s; <i>filtered</i>"), s);
+ }
g_free (s);
s = snew;
}
g_assert(item != NULL);
g_assert(SP_IS_ITEM(item));
- SPDesktop *desktop = inkscape_active_desktop();
- return sp_item_i2doc_affine(item) * desktop->doc2dt();
+ Geom::Matrix const ret( sp_item_i2doc_affine(item)
+ * Geom::Scale(1, -1)
+ * Geom::Translate(0, sp_document_height(SP_OBJECT_DOCUMENT(item))) );
+ return ret;
}
void sp_item_set_i2d_affine(SPItem *item, Geom::Matrix const &i2dt)