[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r9946 - in gnuradio/trunk/grc/src: gui platforms/gui
From: |
jblum |
Subject: |
[Commit-gnuradio] r9946 - in gnuradio/trunk/grc/src: gui platforms/gui |
Date: |
Thu, 6 Nov 2008 16:55:45 -0700 (MST) |
Author: jblum
Date: 2008-11-06 16:55:45 -0700 (Thu, 06 Nov 2008)
New Revision: 9946
Modified:
gnuradio/trunk/grc/src/gui/Dialogs.py
gnuradio/trunk/grc/src/platforms/gui/FlowGraph.py
Log:
remove connection with drag
Modified: gnuradio/trunk/grc/src/gui/Dialogs.py
===================================================================
--- gnuradio/trunk/grc/src/gui/Dialogs.py 2008-11-06 20:08:22 UTC (rev
9945)
+++ gnuradio/trunk/grc/src/gui/Dialogs.py 2008-11-06 23:55:45 UTC (rev
9946)
@@ -122,7 +122,7 @@
('Paste Block', 'Ctrl + v'),
('Undo Change', 'Ctrl + z'),
('Redo Change', 'Ctrl + y'),
- ('Delete Block', 'Delete'),
+ ('Delete Element', 'Delete'),
('Modify Parameters', 'Enter'),
('Rotate Block', 'Right'),
('Rotate Block', 'Left'),
Modified: gnuradio/trunk/grc/src/platforms/gui/FlowGraph.py
===================================================================
--- gnuradio/trunk/grc/src/platforms/gui/FlowGraph.py 2008-11-06 20:08:22 UTC
(rev 9945)
+++ gnuradio/trunk/grc/src/platforms/gui/FlowGraph.py 2008-11-06 23:55:45 UTC
(rev 9946)
@@ -24,7 +24,8 @@
MOTION_DETECT_REDRAWING_SENSITIVITY
from ... gui.Actions import \
ELEMENT_CREATE, ELEMENT_SELECT, \
- BLOCK_PARAM_MODIFY, BLOCK_MOVE
+ BLOCK_PARAM_MODIFY, BLOCK_MOVE, \
+ ELEMENT_DELETE
import Colors
import Utils
from ... import utils
@@ -63,9 +64,9 @@
self._old_selected_port = None
self._new_selected_port = None
-###########################################################################
-# Access Drawing Area
-###########################################################################
+
###########################################################################
+ # Access Drawing Area
+
###########################################################################
def get_drawing_area(self): return self.drawing_area
def get_gc(self): return self.get_drawing_area().gc
def get_pixmap(self): return self.get_drawing_area().pixmap
@@ -545,7 +546,10 @@
elif pos-adj_val < SCROLL_PROXIMITY_SENSITIVITY:
adj.set_value(adj_val-SCROLL_DISTANCE)
adj.emit('changed')
- #move the selected element and record the new coordinate
+ #remove the connection if selected in drag event
+ if len(self.get_selected_elements()) == 1 and
self.get_selected_element().is_connection():
+ self.handle_states(ELEMENT_DELETE)
+ #move the selected elements and record the new coordinate
X, Y = self.get_coordinate()
if not self.get_ctrl_mask(): self.move_selected((int(x - X),
int(y - Y)))
self.draw()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r9946 - in gnuradio/trunk/grc/src: gui platforms/gui,
jblum <=