diff options
| author | Martin Owens <doctormo@gmail.com> | 2017-08-13 11:14:01 +0000 |
|---|---|---|
| committer | Martin Owens <doctormo@gmail.com> | 2017-08-13 11:14:01 +0000 |
| commit | 454cdce30b2018c5ef0deb4af148cead232ed0cd (patch) | |
| tree | 6c99a18139d25f09ec6a0b07f6567f4f1e22ee1e | |
| parent | Remove Info.plist.in (diff) | |
| parent | SelTrans: fix inconsistencies with _norm, _grip, and rotation center (diff) | |
| download | inkscape-454cdce30b2018c5ef0deb4af148cead232ed0cd.tar.gz inkscape-454cdce30b2018c5ef0deb4af148cead232ed0cd.zip | |
Merge branch 'ao2/inkscape-seltrans-fix-norm-grip-and-rotation-center'
| -rw-r--r-- | src/seltrans.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/seltrans.cpp b/src/seltrans.cpp index 1afb71f68..9e18bbe90 100644 --- a/src/seltrans.cpp +++ b/src/seltrans.cpp @@ -131,13 +131,13 @@ Inkscape::SelTrans::SelTrans(SPDesktop *desktop) : _norm = sp_canvas_item_new(desktop->getControls(), SP_TYPE_CTRL, "anchor", SP_ANCHOR_CENTER, - "mode", SP_CTRL_MODE_COLOR, + "mode", SP_CTRL_MODE_XOR, "shape", SP_CTRL_SHAPE_BITMAP, "size", 13.0, "filled", TRUE, "fill_color", 0x00000000, "stroked", TRUE, - "stroke_color", 0x000000a0, + "stroke_color", 0xff0000b0, "pixbuf", handles[12], NULL); @@ -150,7 +150,7 @@ Inkscape::SelTrans::SelTrans(SPDesktop *desktop) : "filled", TRUE, "fill_color", 0xffffff7f, "stroked", TRUE, - "stroke_color", 0xffffffff, + "stroke_color", 0xff0000b0, "pixbuf", handles[12], NULL); @@ -727,12 +727,16 @@ void Inkscape::SelTrans::handleClick(SPKnot */*knot*/, guint state, SPSelTransHa void Inkscape::SelTrans::handleGrab(SPKnot *knot, guint /*state*/, SPSelTransHandle const &handle) { + grab(knot->position(), handle.x, handle.y, FALSE, FALSE); + + // Forcing handles visibility must be done after grab() to be effective switch (handle.type) { case HANDLE_CENTER: g_object_set(G_OBJECT(_grip), "shape", SP_CTRL_SHAPE_BITMAP, "size", 13.0, NULL); + sp_canvas_item_hide(_norm); sp_canvas_item_show(_grip); break; default: @@ -744,8 +748,6 @@ void Inkscape::SelTrans::handleGrab(SPKnot *knot, guint /*state*/, SPSelTransHan sp_canvas_item_show(_grip); break; } - - grab(knot->position(), handle.x, handle.y, FALSE, FALSE); } |
