diff options
author | David Robillard <d@drobilla.net> | 2010-02-26 02:43:23 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-02-26 02:43:23 +0000 |
commit | 43a030b26c4d07270275013b797b7a9c13e9c09e (patch) | |
tree | 2144fd07146befa79e72553a50955ace4fbee808 | |
parent | f982e4b62ebba89ead634169ebe4e281cc7df46a (diff) | |
download | ingen-43a030b26c4d07270275013b797b7a9c13e9c09e.tar.gz ingen-43a030b26c4d07270275013b797b7a9c13e9c09e.tar.bz2 ingen-43a030b26c4d07270275013b797b7a9c13e9c09e.zip |
Arrange at the top left and scroll to top left corner by default.
This seems much saner than in the "middle" of some arbitrarily large canvas
(which was never quite right), which requires that size to be hardcoded
everywhere. This way Feels tighter and more document based to me as well...
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2496 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r-- | src/engine/Engine.cpp | 4 | ||||
-rw-r--r-- | src/gui/PatchWindow.cpp | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/engine/Engine.cpp b/src/engine/Engine.cpp index dde8ec8b..dd25485a 100644 --- a/src/engine/Engine.cpp +++ b/src/engine/Engine.cpp @@ -199,6 +199,8 @@ Engine::activate() Shared::Resource::Properties in_properties(control_properties); in_properties.insert(make_pair(uris.rdf_type, uris.lv2_InputPort)); in_properties.insert(make_pair(uris.lv2_index, 0)); + in_properties.insert(make_pair(uris.ingenui_canvas_x, 32.0f)); + in_properties.insert(make_pair(uris.ingenui_canvas_y, 32.0f)); execute_and_delete_event(context, new Events::CreatePort( *this, SharedPtr<Request>(), 0, @@ -208,6 +210,8 @@ Engine::activate() Shared::Resource::Properties out_properties(control_properties); out_properties.insert(make_pair(uris.rdf_type, uris.lv2_OutputPort)); out_properties.insert(make_pair(uris.lv2_index, 1)); + out_properties.insert(make_pair(uris.ingenui_canvas_x, 128.0f)); + out_properties.insert(make_pair(uris.ingenui_canvas_y, 32.0f)); execute_and_delete_event(context, new Events::CreatePort( *this, SharedPtr<Request>(), 0, diff --git a/src/gui/PatchWindow.cpp b/src/gui/PatchWindow.cpp index 27e2737e..39544808 100644 --- a/src/gui/PatchWindow.cpp +++ b/src/gui/PatchWindow.cpp @@ -254,8 +254,6 @@ PatchWindow::set_patch(SharedPtr<PatchModel> patch, SharedPtr<PatchView> view) show_all(); - _view->canvas()->scroll_to_center(); - _view->signal_object_entered.connect(sigc::mem_fun(this, &PatchWindow::object_entered)); _view->signal_object_left.connect(sigc::mem_fun(this, &PatchWindow::object_left)); |