From bdf703831ff93438d49324ab842052ccaf390a5d Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Sun, 26 Jun 2011 22:00:36 +0200 Subject: =?UTF-8?q?-=20Add=20a=20third=20group=20of=20snap=20sources/targe?= =?UTF-8?q?ts,=20called=20=C2=A8others=C2=A8=20(before=20we=20had=20only?= =?UTF-8?q?=20=C2=A8bounding=20box=C2=A8=20and=20nodes=20(see=20bug=20#788?= =?UTF-8?q?178)=20-=20Fix=20the=20display=20of=20the=20snap=20source=20-?= =?UTF-8?q?=20Fix=20snapping=20of=20guides=20to=20other=20guides=20&=20gri?= =?UTF-8?q?ds?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (bzr r10372) --- src/attributes.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/attributes.cpp') diff --git a/src/attributes.cpp b/src/attributes.cpp index 118a90482..334c3447c 100644 --- a/src/attributes.cpp +++ b/src/attributes.cpp @@ -94,6 +94,7 @@ static SPStyleProp const props[] = { {SP_ATTR_INKSCAPE_SNAP_GLOBAL, "inkscape:snap-global"}, {SP_ATTR_INKSCAPE_SNAP_BBOX, "inkscape:snap-bbox"}, {SP_ATTR_INKSCAPE_SNAP_NODES, "inkscape:snap-nodes"}, + {SP_ATTR_INKSCAPE_SNAP_OTHERS, "inkscape:snap-others"}, {SP_ATTR_INKSCAPE_SNAP_FROM_GUIDE, "inkscape:snap-from-guide"}, {SP_ATTR_INKSCAPE_SNAP_CENTER, "inkscape:snap-center"}, {SP_ATTR_INKSCAPE_SNAP_GRIDS, "inkscape:snap-grids"}, @@ -495,6 +496,7 @@ sp_attribute_lookup(gchar const *key) propdict = g_hash_table_new(g_str_hash, g_str_equal); for (i = 1; i < n_attrs; i++) { g_assert(props[i].code == static_cast< gint >(i) ); + // If this g_assert fails, then the sort order of SPAttributeEnum does not match the order in props[]! g_hash_table_insert(propdict, const_cast(static_cast(props[i].name)), GINT_TO_POINTER(props[i].code)); -- cgit v1.2.3