aboutsummaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/MachinaCanvas.cpp4
-rw-r--r--src/gui/MachinaGUI.cpp4
2 files changed, 3 insertions, 5 deletions
diff --git a/src/gui/MachinaCanvas.cpp b/src/gui/MachinaCanvas.cpp
index f8c88ac..da03cd9 100644
--- a/src/gui/MachinaCanvas.cpp
+++ b/src/gui/MachinaCanvas.cpp
@@ -90,10 +90,8 @@ MachinaCanvas::on_event(GdkEvent* event)
action_create_node(event->button.x, event->button.y);
return true;
-
- } else {
- return Canvas::on_event(event);
}
+ return false;
}
void
diff --git a/src/gui/MachinaGUI.cpp b/src/gui/MachinaGUI.cpp
index 6291399..2323f4a 100644
--- a/src/gui/MachinaGUI.cpp
+++ b/src/gui/MachinaGUI.cpp
@@ -97,8 +97,8 @@ MachinaGUI::MachinaGUI(SharedPtr<Machina::Engine> engine)
_canvas_scrolledwindow->add(_canvas->widget());
_canvas_scrolledwindow->signal_event().connect(sigc::mem_fun(this,
&MachinaGUI::scrolled_window_event));
- _canvas->scroll_to(static_cast<int>(_canvas->width()/2 - 320),
- static_cast<int>(_canvas->height()/2 - 240)); // FIXME: hardcoded
+ _canvas->scroll_to(static_cast<int>(_canvas->get_width()/2.0 - 320),
+ static_cast<int>(_canvas->get_height()/2.0 - 240)); // FIXME: hardcoded
_canvas_scrolledwindow->property_hadjustment().get_value()->set_step_increment(10);
_canvas_scrolledwindow->property_vadjustment().get_value()->set_step_increment(10);