diff options
author | David Robillard <d@drobilla.net> | 2010-02-26 04:39:25 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-02-26 04:39:25 +0000 |
commit | 624e0d3ecd8149acdb3a44ece08dccd3337b3300 (patch) | |
tree | 630b251f8f9289d1126fb1f2c4eff697689a7efd /src/gui/PatchCanvas.cpp | |
parent | 7f748d6f5d25d81a7703fa5f3e4c6015ab40a0c5 (diff) | |
download | ingen-624e0d3ecd8149acdb3a44ece08dccd3337b3300.tar.gz ingen-624e0d3ecd8149acdb3a44ece08dccd3337b3300.tar.bz2 ingen-624e0d3ecd8149acdb3a44ece08dccd3337b3300.zip |
Add center parameter to FlowCanvas::Canvas::arrange with default value true
(eqivalent default behaviour to API pre-r2496).
Add FlowCanvas::Canvas::move_contents_to to allow apps to move canvas contents
to a given location (e.g. the origin or the center), keeping their relative
distances the same.
This commit preserves centering by default with the option to arrange in
the top left, but applications shouldn't assume anything about the origin
of coordinates (i.e. applications should manually scroll to where items
exist when loading a set of items with coordinates, not simply assume
they are centered about a particular location).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2500 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui/PatchCanvas.cpp')
-rw-r--r-- | src/gui/PatchCanvas.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/PatchCanvas.cpp b/src/gui/PatchCanvas.cpp index 69cb0414..2a406191 100644 --- a/src/gui/PatchCanvas.cpp +++ b/src/gui/PatchCanvas.cpp @@ -278,9 +278,9 @@ PatchCanvas::build() void -PatchCanvas::arrange(bool ingen_doesnt_use_length_hints) +PatchCanvas::arrange(bool use_length_hints, bool center) { - FlowCanvas::Canvas::arrange(false); + FlowCanvas::Canvas::arrange(false, center); for (list<boost::shared_ptr<Item> >::iterator i = _items.begin(); i != _items.end(); ++i) (*i)->store_location(); |