summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-01-22 17:56:08 +0000
committerDavid Robillard <d@drobilla.net>2010-01-22 17:56:08 +0000
commit80838b9dcfde1e5d9760ae4d3123a45854a47c32 (patch)
treef98fe4bd7510032165e33fce074a0d0119b4f78f /src
parentb84e1a5fea2c1f38f927f29d917b21109a68ce93 (diff)
downloadingen-80838b9dcfde1e5d9760ae4d3123a45854a47c32.tar.gz
ingen-80838b9dcfde1e5d9760ae4d3123a45854a47c32.tar.bz2
ingen-80838b9dcfde1e5d9760ae4d3123a45854a47c32.zip
Use FlowCanvas centering code.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2381 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/gui/PatchWindow.cpp8
1 files 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<PatchModel> patch, SharedPtr<PatchView> 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<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));