aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-12-04 00:27:01 +0000
committerDavid Robillard <d@drobilla.net>2011-12-04 00:27:01 +0000
commit0cbf4134611296218737ff7e4210efa5a661376e (patch)
tree9f1108b9006a486fd5a0a0cab4655c5796371a43
parentff0f1dbcafd1f86bdaba76d65b26a44cf47c6711 (diff)
downloadmachina-0cbf4134611296218737ff7e4210efa5a661376e.tar.gz
machina-0cbf4134611296218737ff7e4210efa5a661376e.tar.bz2
machina-0cbf4134611296218737ff7e4210efa5a661376e.zip
Remove redundant _canvas field from Item.
git-svn-id: http://svn.drobilla.net/lad/trunk/machina@3783 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--src/gui/EdgeView.cpp2
-rw-r--r--src/gui/NodeView.cpp4
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<MachinaCanvas*>(_canvas);
+ MachinaCanvas* canvas = dynamic_cast<MachinaCanvas*>(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<MachinaCanvas*>(_canvas);
+ MachinaCanvas* canvas = dynamic_cast<MachinaCanvas*>(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<MachinaCanvas*>(_canvas);
+ MachinaCanvas* canvas = dynamic_cast<MachinaCanvas*>(this->canvas());
_enter_action_connection.disconnect();
_enter_action = canvas->app()->client_model()->find(action_id);
_enter_action_connection = _enter_action->signal_property.connect(