From 43a030b26c4d07270275013b797b7a9c13e9c09e Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 26 Feb 2010 02:43:23 +0000 Subject: 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 --- src/engine/Engine.cpp | 4 ++++ src/gui/PatchWindow.cpp | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src') 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(), 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(), 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 patch, SharedPtr 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)); -- cgit v1.2.1