summaryrefslogtreecommitdiffstats
path: root/src/Canvas.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Canvas.cpp')
-rw-r--r--src/Canvas.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Canvas.cpp b/src/Canvas.cpp
index 96b097f..4f3ca33 100644
--- a/src/Canvas.cpp
+++ b/src/Canvas.cpp
@@ -1341,7 +1341,7 @@ GanvCanvasImpl::connect_drag_handler(GdkEvent* event)
GanvNode* joinee = get_node_at(x, y);
- if (joinee) {
+ if (GANV_IS_PORT(joinee)) {
if (joinee == GANV_NODE(_connect_port)) {
// Drag ended on the same port it started on, port clicked
if (_selected_ports.empty()) {
@@ -1402,7 +1402,8 @@ GanvCanvasImpl::port_event(GdkEvent* event, GanvPort* port)
if (module && port->impl->control &&
(port->impl->is_input ||
- port_x < ganv_box_get_width(GANV_BOX(port)) / 2.0)) {
+ (port->impl->is_controllable &&
+ port_x < ganv_box_get_width(GANV_BOX(port)) / 2.0))) {
if (port->impl->control->is_toggle) {
if (port->impl->control->value >= 0.5) {
ganv_port_set_control_value_internal(port, 0.0);