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 From 8911d9a8ca0c7f4ef1476b2f056adf2afa4e99cd Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Thu, 30 Jun 2011 22:46:15 +0200 Subject: Implement decent snapping to text (baseline & anchor), and provide a toggle button for this (as requested in LP bug #727281 ) (bzr r10392) --- src/attributes.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/attributes.cpp') diff --git a/src/attributes.cpp b/src/attributes.cpp index 334c3447c..47b261038 100644 --- a/src/attributes.cpp +++ b/src/attributes.cpp @@ -102,6 +102,7 @@ static SPStyleProp const props[] = { {SP_ATTR_INKSCAPE_SNAP_SMOOTH_NODES, "inkscape:snap-smooth-nodes"}, {SP_ATTR_INKSCAPE_SNAP_LINE_MIDPOINTS, "inkscape:snap-midpoints"}, {SP_ATTR_INKSCAPE_SNAP_OBJECT_MIDPOINTS, "inkscape:snap-object-midpoints"}, + {SP_ATTR_INKSCAPE_SNAP_TEXT_BASELINE, "inkscape:snap-text-baseline"}, {SP_ATTR_INKSCAPE_SNAP_BBOX_EDGE_MIDPOINTS, "inkscape:snap-bbox-edge-midpoints"}, {SP_ATTR_INKSCAPE_SNAP_BBOX_MIDPOINTS, "inkscape:snap-bbox-midpoints"}, {SP_ATTR_INKSCAPE_SNAP_INTERS_PATHS, "inkscape:snap-intersection-paths"}, -- cgit v1.2.3