From 0cbf4134611296218737ff7e4210efa5a661376e Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 4 Dec 2011 00:27:01 +0000 Subject: Remove redundant _canvas field from Item. git-svn-id: http://svn.drobilla.net/lad/trunk/machina@3783 a436a847-0d15-0410-975c-d299462d15a1 --- src/gui/EdgeView.cpp | 2 +- src/gui/NodeView.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/EdgeView.cpp b/src/gui/EdgeView.cpp index d8a4ce1..f7c154b 100644 --- a/src/gui/EdgeView.cpp +++ b/src/gui/EdgeView.cpp @@ -97,7 +97,7 @@ EdgeView::show_label(bool show) bool EdgeView::on_event(GdkEvent* ev) { - MachinaCanvas* canvas = dynamic_cast(_canvas); + MachinaCanvas* canvas = dynamic_cast(this->canvas()); if (ev->type == GDK_BUTTON_PRESS) { if (ev->button.state & GDK_CONTROL_MASK) { if (ev->button.button == 1) { diff --git a/src/gui/NodeView.cpp b/src/gui/NodeView.cpp index 71852ab..66c090f 100644 --- a/src/gui/NodeView.cpp +++ b/src/gui/NodeView.cpp @@ -64,7 +64,7 @@ bool NodeView::on_click(GdkEventButton* event) { if (event->state & GDK_CONTROL_MASK) { - MachinaCanvas* canvas = dynamic_cast(_canvas); + MachinaCanvas* canvas = dynamic_cast(this->canvas()); if (event->button == 1) { canvas->app()->controller()->set_property( _node->id(), @@ -142,7 +142,7 @@ NodeView::on_property(Machina::URIInt key, const Raul::Atom& value) } } else if (key == URIs::instance().machina_enter_action) { const uint64_t action_id = value.get_int32(); - MachinaCanvas* canvas = dynamic_cast(_canvas); + MachinaCanvas* canvas = dynamic_cast(this->canvas()); _enter_action_connection.disconnect(); _enter_action = canvas->app()->client_model()->find(action_id); _enter_action_connection = _enter_action->signal_property.connect( -- cgit v1.2.1