[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 58/101: grc: gtk3: fix bug in mouse motion
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 58/101: grc: gtk3: fix bug in mouse motion handling |
Date: |
Thu, 16 Mar 2017 14:58:07 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch python3
in repository gnuradio.
commit 2cd2b5b781bc656afb333c8fd8142244e92b19de
Author: Sebastian Koslowski <address@hidden>
Date: Fri Jul 29 16:09:24 2016 +0200
grc: gtk3: fix bug in mouse motion handling
---
grc/gui/DrawingArea.py | 5 +++--
grc/gui/FlowGraph.py | 4 ++--
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/grc/gui/DrawingArea.py b/grc/gui/DrawingArea.py
index 33c669c..cc82c70 100644
--- a/grc/gui/DrawingArea.py
+++ b/grc/gui/DrawingArea.py
@@ -117,8 +117,10 @@ class DrawingArea(Gtk.DrawingArea):
self.button_state[event.button] = True
if event.button == 1:
+ double_click = (event.type == Gdk.EventType._2BUTTON_PRESS)
+ self.button_state[1] = not double_click
self._flow_graph.handle_mouse_selector_press(
- double_click=(event.type == Gdk.EventType._2BUTTON_PRESS),
+ double_click=double_click,
coordinate=self._translate_event_coords(event),
)
elif event.button == 3:
@@ -151,7 +153,6 @@ class DrawingArea(Gtk.DrawingArea):
self._flow_graph.handle_mouse_motion(
coordinate=self._translate_event_coords(event),
- button1_pressed=self.button_state[1]
)
def _auto_scroll(self, event):
diff --git a/grc/gui/FlowGraph.py b/grc/gui/FlowGraph.py
index 6ff4507..d573239 100644
--- a/grc/gui/FlowGraph.py
+++ b/grc/gui/FlowGraph.py
@@ -687,7 +687,7 @@ class FlowGraph(Element, _Flowgraph):
self.element_moved = False
self.update_selected_elements()
- def handle_mouse_motion(self, coordinate, button1_pressed):
+ def handle_mouse_motion(self, coordinate):
"""
The mouse has moved, respond to mouse dragging or notify elements
Move a selected element to the new coordinate.
@@ -695,7 +695,7 @@ class FlowGraph(Element, _Flowgraph):
"""
# to perform a movement, the mouse must be pressed
# (no longer checking pending events via Gtk.events_pending() - always
true in Windows)
- if not button1_pressed:
+ if not self.mouse_pressed:
self._handle_mouse_motion_move(coordinate)
else:
self._handle_mouse_motion_drag(coordinate)
- [Commit-gnuradio] [gnuradio] 55/101: grc: various clean-ups and fixes, (continued)
- [Commit-gnuradio] [gnuradio] 55/101: grc: various clean-ups and fixes, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 48/101: grc: refactor: class for nports port clones, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 49/101: grc: refactor: some more bus ports stuff, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 50/101: grc: refactor: move type and port controllers to gui, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 66/101: grc: gtk3: remove deprecated add_with_viewport(), git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 73/101: grc: gtk3: Tweaked color styles for ports, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 63/101: grc: gtk3: speed up what_is_selected(), git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 76/101: grc: gtk3: calculate flowgraph canvas size, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 39/101: grc: gtk3: update gui element class, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 86/101: grc: gtk3: Renamed the ActionHandler to Application, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 58/101: grc: gtk3: fix bug in mouse motion handling,
git <=
- [Commit-gnuradio] [gnuradio] 51/101: grc: gtk3: fix port label hiding, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 59/101: grc: gtk3: fix drag and drop from block tree, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 30/101: grc: refactor: selected blocks handling, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 74/101: grc: gtk3: minor gui flowgraph cleanup, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 93/101: grc: gtk3: python3 error, some cmake fixes, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 85/101: grc: refactor: Moved the notebook and console into separate classes., git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 61/101: grc: gtk3: draw ports before blocks and simplyfied draw code, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 80/101: grc: gtk3: fix MessageDialog for Variable Panel config, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 87/101: grc: refactor: Added logging, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 77/101: grc: gtk3: make screnshots as png, pdf and svg, git, 2017/03/16