commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r10803 - gnuradio/branches/developers/jblum/grc/grc/sr


From: jblum
Subject: [Commit-gnuradio] r10803 - gnuradio/branches/developers/jblum/grc/grc/src/platforms/gui
Date: Sat, 11 Apr 2009 01:33:07 -0600 (MDT)

Author: jblum
Date: 2009-04-11 01:33:06 -0600 (Sat, 11 Apr 2009)
New Revision: 10803

Modified:
   gnuradio/branches/developers/jblum/grc/grc/src/platforms/gui/FlowGraph.py
Log:
Big Fix. Draw always checks for window resize, dont wait for update.



Modified: 
gnuradio/branches/developers/jblum/grc/grc/src/platforms/gui/FlowGraph.py
===================================================================
--- gnuradio/branches/developers/jblum/grc/grc/src/platforms/gui/FlowGraph.py   
2009-04-11 06:22:06 UTC (rev 10802)
+++ gnuradio/branches/developers/jblum/grc/grc/src/platforms/gui/FlowGraph.py   
2009-04-11 07:33:06 UTC (rev 10803)
@@ -263,6 +263,10 @@
                Draw all of the elements in this flow graph onto the pixmap.
                Draw the pixmap to the drawable window of this flow graph.
                """
+               try: #set the size of the flow graph area (if changed)
+                       new_size = self.get_option('window_size')
+                       if self.get_size() != tuple(new_size): 
self.set_size(*new_size)
+               except: pass
                if self.get_gc():
                        W,H = self.get_size()
                        #draw the background
@@ -293,7 +297,6 @@
                """
                Update highlighting so only the selected is highlighted.
                Call update on all elements.
-               Resize the window if size changed.
                """
                #update highlighting
                map(lambda e: e.set_highlighted(False), self.get_elements())
@@ -301,11 +304,6 @@
                        selected_element.set_highlighted(True)
                #update all elements
                map(lambda e: e.update(), self.get_elements())
-               #set the size of the flow graph area
-               old_x, old_y = self.get_size()
-               try: new_x, new_y = self.get_option('window_size')
-               except: new_x, new_y = old_x, old_y
-               if new_x != old_x or new_y != old_y: self.set_size(new_x, new_y)
 
        
##########################################################################
        ## Get Selected





reply via email to

[Prev in Thread] Current Thread [Next in Thread]