diff options
| author | bulia byak <buliabyak@gmail.com> | 2006-03-27 17:13:26 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2006-03-27 17:13:26 +0000 |
| commit | 9a8935a491f7dcae2f9c83b70c50398c37cfd1a5 (patch) | |
| tree | 0348c21404e3a5d38f4c60fd5031186ad239cc66 /src/selection-chemistry.cpp | |
| parent | fix 1459154 (diff) | |
| download | inkscape-9a8935a491f7dcae2f9c83b70c50398c37cfd1a5.tar.gz inkscape-9a8935a491f7dcae2f9c83b70c50398c37cfd1a5.zip | |
obey scale ratio lock
(bzr r311)
Diffstat (limited to 'src/selection-chemistry.cpp')
| -rw-r--r-- | src/selection-chemistry.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp index d01bb3e50..811e0d6bd 100644 --- a/src/selection-chemistry.cpp +++ b/src/selection-chemistry.cpp @@ -1151,7 +1151,10 @@ void sp_selection_paste_size (bool apply_x, bool apply_y) double scale_x = size_clipboard.extent(NR::X) / current.extent(NR::X); double scale_y = size_clipboard.extent(NR::Y) / current.extent(NR::Y); - sp_selection_scale_relative (selection, current.midpoint(), NR::scale(apply_x? scale_x : 1.0, apply_y? scale_y : 1.0)); + sp_selection_scale_relative (selection, current.midpoint(), + NR::scale( + apply_x? scale_x : (desktop->isToolboxButtonActive ("lock")? scale_y : 1.0), + apply_y? scale_y : (desktop->isToolboxButtonActive ("lock")? scale_x : 1.0))); sp_document_done(SP_DT_DOCUMENT (desktop)); } @@ -1186,7 +1189,11 @@ void sp_selection_paste_size_separately (bool apply_x, bool apply_y) double scale_x = size_clipboard.extent(NR::X) / current.extent(NR::X); double scale_y = size_clipboard.extent(NR::Y) / current.extent(NR::Y); - sp_item_scale_rel (item, NR::scale(apply_x? scale_x : 1.0, apply_y? scale_y : 1.0)); + sp_item_scale_rel (item, + NR::scale( + apply_x? scale_x : (desktop->isToolboxButtonActive ("lock")? scale_y : 1.0), + apply_y? scale_y : (desktop->isToolboxButtonActive ("lock")? scale_x : 1.0))); + } sp_document_done(SP_DT_DOCUMENT (desktop)); |
