1. === modified file 'src/live_effects/lpe-copy_rotate.cpp'
  2. --- src/live_effects/lpe-copy_rotate.cpp 2016-12-20 00:54:38 +0000
  3. +++ src/live_effects/lpe-copy_rotate.cpp 2016-12-20 19:50:25 +0000
  4. @@ -113,7 +113,7 @@
  5. A = Point(boundingbox_X.min(), boundingbox_Y.middle());
  6. B = Point(boundingbox_X.middle(), boundingbox_Y.middle());
  7. - origin.param_setValue(A);
  8. + origin.param_setValue(A, true);
  9. origin.param_update_default(A);
  10. dist_angle_handle = L2(B - A);
  11. dir = unit_vector(B - A);
  12. @@ -171,7 +171,7 @@
  13. start_pos = origin + dir * Rotate(-rad_from_deg(starting_angle)) * dist_angle_handle;
  14. rot_pos = origin + dir * Rotate(-rad_from_deg(rotation_angle+starting_angle)) * dist_angle_handle;
  15. if (near) {
  16. - starting_point.param_setValue(start_pos);
  17. + starting_point.param_setValue(start_pos, true);
  18. }
  19. previous_start_point = (Geom::Point)starting_point;
  20. if ( fuse_paths || copies_to_360 ) {
  21. === modified file 'src/live_effects/lpe-mirror_symmetry.cpp'
  22. --- src/live_effects/lpe-mirror_symmetry.cpp 2016-12-20 00:54:38 +0000
  23. +++ src/live_effects/lpe-mirror_symmetry.cpp 2016-12-20 20:44:11 +0000
  24. @@ -113,46 +113,47 @@
  25. point_a = Geom::Point(center_point[X],boundingbox_Y.min());
  26. point_b = Geom::Point(center_point[X],boundingbox_Y.max());
  27. }
  28. - if (Geom::are_near((Geom::Point)start_point, (Geom::Point)end_point, 0.01)) {
  29. - start_point.param_setValue(point_a);
  30. - end_point.param_setValue(point_b);
  31. + if ((Geom::Point)start_point == (Geom::Point)end_point && (Geom::Point)start_point == Geom::Point(0,0)) {
  32. + start_point.param_setValue(point_a, true);
  33. + end_point.param_setValue(point_b, true);
  34. + previous_center = Geom::middle_point((Geom::Point)start_point, (Geom::Point)end_point);
  35. + center_point.param_setValue(previous_center, true);
  36. }
  37. if ( mode == MT_X || mode == MT_Y ) {
  38. start_point.param_setValue(point_a, true);
  39. end_point.param_setValue(point_b, true);
  40. + center_point.param_setValue(Geom::middle_point(point_a, point_b), true);
  41. } else if ( mode == MT_FREE) {
  42. - if(!are_near(previous_center,center_point, 0.01)) {
  43. - Geom::Point trans = center_point - previous_center;
  44. + if (are_near(previous_center, (Geom::Point)center_point, 0.01)) {
  45. + center_point.param_setValue(Geom::middle_point((Geom::Point)start_point, (Geom::Point)end_point), true);
  46. + } else {
  47. + Geom::Point trans = center_point - Geom::middle_point((Geom::Point)start_point, (Geom::Point)end_point);
  48. start_point.param_setValue(start_point * trans, true);
  49. end_point.param_setValue(end_point * trans, true);
  50. }
  51. } else if ( mode == MT_V){
  52. - if(SP_ACTIVE_DESKTOP){
  53. - SPDocument * doc = SP_ACTIVE_DESKTOP->getDocument();
  54. - Geom::Rect view_box_rect = doc->getViewBox();
  55. - Geom::Point sp = Geom::Point(view_box_rect.width()/2.0, 0);
  56. - sp *= i2anc_affine(SP_OBJECT(lpeitem), SP_OBJECT(SP_ACTIVE_DESKTOP->currentLayer()->parent)) .inverse();
  57. - start_point.param_setValue(sp, true);
  58. - Geom::Point ep = Geom::Point(view_box_rect.width()/2.0, view_box_rect.height());
  59. - ep *= i2anc_affine(SP_OBJECT(lpeitem), SP_OBJECT(SP_ACTIVE_DESKTOP->currentLayer()->parent)) .inverse();
  60. - end_point.param_setValue(ep, true);
  61. - }
  62. + SPDocument * document = SP_ACTIVE_DOCUMENT;
  63. + Geom::Affine transform = i2anc_affine(SP_OBJECT(lpeitem), NULL).inverse();
  64. + Geom::Point sp = Geom::Point(document->getWidth().value("px")/2.0, 0) * transform;
  65. + start_point.param_setValue(sp, true);
  66. + Geom::Point ep = Geom::Point(document->getWidth().value("px")/2.0, document->getHeight().value("px")) * transform;
  67. + end_point.param_setValue(ep, true);
  68. + center_point.param_setValue(Geom::middle_point((Geom::Point)start_point, (Geom::Point)end_point), true);
  69. + previous_center = center_point;
  70. } else { //horizontal page
  71. - if(SP_ACTIVE_DESKTOP){
  72. - SPDocument * doc = SP_ACTIVE_DESKTOP->getDocument();
  73. - Geom::Rect view_box_rect = doc->getViewBox();
  74. - Geom::Point sp = Geom::Point(0, view_box_rect.height()/2.0);
  75. - sp *= i2anc_affine(SP_OBJECT(lpeitem), SP_OBJECT(SP_ACTIVE_DESKTOP->currentLayer()->parent)) .inverse();
  76. - start_point.param_setValue(sp, true);
  77. - Geom::Point ep = Geom::Point(view_box_rect.width(), view_box_rect.height()/2.0);
  78. - ep *= i2anc_affine(SP_OBJECT(lpeitem), SP_OBJECT(SP_ACTIVE_DESKTOP->currentLayer()->parent)) .inverse();
  79. - end_point.param_setValue(ep, true);
  80. - }
  81. - }
  82. - previous_center = Geom::middle_point((Geom::Point)start_point, (Geom::Point)end_point);
  83. - if (!are_near(previous_center, center_point,0.01)) {
  84. - center_point.param_setValue(previous_center);
  85. - }
  86. + SPDocument * document = SP_ACTIVE_DOCUMENT;
  87. + Geom::Affine transform = i2anc_affine(SP_OBJECT(lpeitem), NULL).inverse();
  88. + Geom::Point sp = Geom::Point(0, document->getHeight().value("px")/2.0) * transform;
  89. + start_point.param_setValue(sp, true);
  90. + Geom::Point ep = Geom::Point(document->getWidth().value("px"), document->getHeight().value("px")/2.0) * transform;
  91. + end_point.param_setValue(ep, true);
  92. + center_point.param_setValue(Geom::middle_point((Geom::Point)start_point, (Geom::Point)end_point), true);
  93. + previous_center = center_point;
  94. + }
  95. + if (!are_near(previous_center, (Geom::Point)center_point, 0.01)) {
  96. + center_point.param_setValue(Geom::middle_point((Geom::Point)start_point, (Geom::Point)end_point), true);
  97. + }
  98. + previous_center = center_point;
  99. }
  100. void
  101. @@ -180,7 +181,7 @@
  102. start_point.param_update_default(point_a);
  103. end_point.param_setValue(point_b, true);
  104. end_point.param_update_default(point_b);
  105. - center_point.param_setValue(point_c);
  106. + center_point.param_setValue(point_c, true);
  107. previous_center = center_point;
  108. }
 
 

29

 

873

Backport to 0.92.xRC5. Fix undo inconsistences on LPE V.05

I want to apply this patch. Any problem. This fix the bugs noticed by suv on IRC and the patch is landed now in trunk.

PasteBin

Lines
112
Words
451
Size
6,1 KB
Created
Revisions
4
Typ
text/plain
General Public License v2 (GPLv2)
Please log in to leave a comment!