summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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));