Commits (1)
......@@ -143,6 +143,7 @@ public:
Inkscape::LayerModel *layers;
/// current selection; will never generally be NULL
Inkscape::Selection *selection;
SPItem *key_object;
Inkscape::UI::Tools::ToolBase *event_context;
Inkscape::LayerManager *layer_manager;
Inkscape::EventLog *event_log;
......
......@@ -167,6 +167,10 @@ void ActionAlign::do_action(SPDesktop *desktop, int index)
break;
};
if (desktop->key_object) {
focus = desktop->key_object; // TODO: 選択できるようにする
}
if(focus)
b = focus->desktopPreferredBounds();
......@@ -874,6 +878,10 @@ private :
break;
};
if (desktop->key_object) {
focus = desktop->key_object; // TODO: 選択できるようにする
}
if(focus) {
if (SP_IS_TEXT (focus) || SP_IS_FLOWTEXT (focus)) {
ref_point = *(te_get_layout(focus)->baselineAnchorPoint())*(focus->i2dt_affine());
......
......@@ -672,7 +672,10 @@ bool SelectTool::root_handler(GdkEvent* event) {
SPGroup *singleGroup = dynamic_cast<SPGroup *>(single);
// without shift, increase state (i.e. toggle scale/rotation handles)
if (selection->includes(this->item)) {
_seltrans->increaseState();
// TODO: 回転操作との共存
// TODO: 選択解除時のキーオブジェクト解除
desktop->key_object = this->item;
// _seltrans->increaseState();
} else if (singleGroup && (singleGroup->layerMode() == SPGroup::LAYER) && single->isAncestorOf(this->item)) {
_seltrans->increaseState();
} else {
......