summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/align-and-distribute.cpp
diff options
context:
space:
mode:
authorMartin Owens <doctormo@gmail.com>2019-02-24 06:13:39 +0000
committerMartin Owens <doctormo@gmail.com>2019-02-24 06:13:39 +0000
commit89dec29933b82615972ab5cb5691df7a445aac6b (patch)
treec3bb2ad8c0beba42805d51f09671a81790e96188 /src/ui/dialog/align-and-distribute.cpp
parentMake background color affect checkerboard (diff)
downloadinkscape-89dec29933b82615972ab5cb5691df7a445aac6b.tar.gz
inkscape-89dec29933b82615972ab5cb5691df7a445aac6b.zip
Merge in bazaar branch for alignment handles
Diffstat (limited to 'src/ui/dialog/align-and-distribute.cpp')
-rw-r--r--src/ui/dialog/align-and-distribute.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/ui/dialog/align-and-distribute.cpp b/src/ui/dialog/align-and-distribute.cpp
index b43afe179..d62ca3ea7 100644
--- a/src/ui/dialog/align-and-distribute.cpp
+++ b/src/ui/dialog/align-and-distribute.cpp
@@ -106,7 +106,7 @@ void ActionAlign::do_node_action(Inkscape::UI::Tools::NodeTool *nt, int verb)
prefs->setInt("/dialogs/align/align-nodes-to", MIN_NODE );
nt->_multipath->alignNodes(Geom::X);
break;
- case SP_VERB_ALIGN_VERTICAL_HORIZONTAL_CENTER:
+ case SP_VERB_ALIGN_BOTH_CENTER:
nt->_multipath->alignNodes(Geom::X);
nt->_multipath->alignNodes(Geom::Y);
break;
@@ -162,6 +162,7 @@ void ActionAlign::do_action(SPDesktop *desktop, int index)
if(focus)
b = focus->desktopPreferredBounds();
+
g_return_if_fail(b);
if (horiz == Selection::HORIZONTAL && desktop->is_yaxisdown()) {
@@ -213,7 +214,7 @@ void ActionAlign::do_action(SPDesktop *desktop, int index)
}
-ActionAlign::Coeffs const ActionAlign::_allCoeffs[11] = {
+ActionAlign::Coeffs const ActionAlign::_allCoeffs[19] = {
{1., 0., 0., 0., 0., 1., 0., 0., SP_VERB_ALIGN_HORIZONTAL_RIGHT_TO_ANCHOR},
{1., 0., 0., 0., 1., 0., 0., 0., SP_VERB_ALIGN_HORIZONTAL_LEFT},
{.5, .5, 0., 0., .5, .5, 0., 0., SP_VERB_ALIGN_HORIZONTAL_CENTER},
@@ -224,7 +225,15 @@ ActionAlign::Coeffs const ActionAlign::_allCoeffs[11] = {
{0., 0., .5, .5, 0., 0., .5, .5, SP_VERB_ALIGN_VERTICAL_CENTER},
{0., 0., 1., 0., 0., 0., 1., 0., SP_VERB_ALIGN_VERTICAL_BOTTOM},
{0., 0., 1., 0., 0., 0., 0., 1., SP_VERB_ALIGN_VERTICAL_TOP_TO_ANCHOR},
- {.5, .5, .5, .5, .5, .5, .5, .5, SP_VERB_ALIGN_VERTICAL_HORIZONTAL_CENTER}
+ {1., 0., 0., 1., 1., 0., 0., 1., SP_VERB_ALIGN_BOTH_TOP_LEFT},
+ {0., 1., 0., 1., 0., 1., 0., 1., SP_VERB_ALIGN_BOTH_TOP_RIGHT},
+ {0., 1., 1., 0., 0., 1., 1., 0., SP_VERB_ALIGN_BOTH_BOTTOM_RIGHT},
+ {1., 0., 1., 0., 1., 0., 1., 0., SP_VERB_ALIGN_BOTH_BOTTOM_LEFT},
+ {0., 1., 1., 0., 1., 0., 0., 1., SP_VERB_ALIGN_BOTH_TOP_LEFT_TO_ANCHOR},
+ {1., 0., 1., 0., 0., 1., 0., 1., SP_VERB_ALIGN_BOTH_TOP_RIGHT_TO_ANCHOR},
+ {1., 0., 0., 1., 0., 1., 1., 0., SP_VERB_ALIGN_BOTH_BOTTOM_RIGHT_TO_ANCHOR},
+ {0., 1., 0., 1., 1., 0., 1., 0., SP_VERB_ALIGN_BOTH_BOTTOM_LEFT_TO_ANCHOR},
+ {.5, .5, .5, .5, .5, .5, .5, .5, SP_VERB_ALIGN_BOTH_CENTER}
};
void ActionAlign::do_verb_action(SPDesktop *desktop, int verb)