From 08f17274a717c74f8f3ea6621844c40e23c323f1 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 9 Feb 2007 19:19:31 +0000 Subject: Removed data type stuff from SLV2. Reworked event system in FlowCanvas to use signals. Added straight connections and arrowheads to FlowCanvas, Ellipse fixes. git-svn-id: http://svn.drobilla.net/lad/patchage@293 a436a847-0d15-0410-975c-d299462d15a1 --- src/PatchageModule.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/PatchageModule.h') diff --git a/src/PatchageModule.h b/src/PatchageModule.h index f9f8d11..7c27d4e 100644 --- a/src/PatchageModule.h +++ b/src/PatchageModule.h @@ -74,6 +74,10 @@ public: virtual void load_location() { + boost::shared_ptr canvas = _canvas.lock(); + if (!canvas) + return; + Coord loc = _app->state_manager()->get_module_location(_name, _type); //cerr << "******" << _name << " MOVING TO (" << loc.x << "," << loc.y << ")" << endl; @@ -81,8 +85,8 @@ public: if (loc.x != -1) move_to(loc.x, loc.y); else - move_to((_canvas.lock()->width()/2) - 100 + rand() % 400, - (_canvas.lock()->height()/2) - 100 + rand() % 400); + move_to((canvas->width()/2) - 100 + rand() % 400, + (canvas->height()/2) - 100 + rand() % 400); } void split() { -- cgit v1.2.1