summaryrefslogtreecommitdiffstats
path: root/src/sp-guide.cpp
diff options
context:
space:
mode:
authorMaximilian Albert <maximilian.albert@gmail.com>2008-03-04 23:05:42 +0000
committercilix42 <cilix42@users.sourceforge.net>2008-03-04 23:05:42 +0000
commite225e5f24d3ce76cd6e8420c454fb6c4dc62a503 (patch)
tree29d0aa4ca382fe290614d7cf8618fb11642a9d6e /src/sp-guide.cpp
parentApply Gail's patch which fixes LP #178646 (diff)
downloadinkscape-e225e5f24d3ce76cd6e8420c454fb6c4dc62a503.tar.gz
inkscape-e225e5f24d3ce76cd6e8420c454fb6c4dc62a503.zip
Also display guides as vertical/horizontal when they are angled at -90/180 degrees
(bzr r4965)
Diffstat (limited to 'src/sp-guide.cpp')
-rw-r--r--src/sp-guide.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sp-guide.cpp b/src/sp-guide.cpp
index a6312f985..81109c4fb 100644
--- a/src/sp-guide.cpp
+++ b/src/sp-guide.cpp
@@ -394,9 +394,11 @@ char *sp_guide_description(SPGuide const *guide)
GString *position_string_x = SP_PX_TO_METRIC_STRING(guide->point_on_line[X], SP_ACTIVE_DESKTOP->namedview->getDefaultMetric());
GString *position_string_y = SP_PX_TO_METRIC_STRING(guide->point_on_line[Y], SP_ACTIVE_DESKTOP->namedview->getDefaultMetric());
- if ( guide->normal_to_line == component_vectors[X] ) {
+ if ( guide->normal_to_line == component_vectors[X] ||
+ guide->normal_to_line == -component_vectors[X]) {
return g_strdup_printf(_("vertical, at %s"), position_string_x->str);
- } else if ( guide->normal_to_line == component_vectors[Y] ) {
+ } else if ( guide->normal_to_line == component_vectors[Y] ||
+ guide->normal_to_line == -component_vectors[Y]) {
return g_strdup_printf(_("horizontal, at %s"), position_string_y->str);
} else {
double const radians = guide->angle();