From 80838b9dcfde1e5d9760ae4d3123a45854a47c32 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 22 Jan 2010 17:56:08 +0000 Subject: Use FlowCanvas centering code. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2381 a436a847-0d15-0410-975c-d299462d15a1 --- src/gui/PatchWindow.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/gui/PatchWindow.cpp b/src/gui/PatchWindow.cpp index 5450d815..926929f9 100644 --- a/src/gui/PatchWindow.cpp +++ b/src/gui/PatchWindow.cpp @@ -244,12 +244,6 @@ PatchWindow::set_patch(SharedPtr patch, SharedPtr view) } } - int width, height; - get_size(width, height); - _view->canvas()->scroll_to( - ((int)_view->canvas()->width() - width)/2, - ((int)_view->canvas()->height() - height)/2); - set_title(_patch->path().chop_scheme() + " - Ingen"); new_port_connection = patch->signal_new_port.connect( @@ -261,6 +255,8 @@ 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