commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] [gnuradio] 01/05: Merge branch 'maint_grcwg' into mast


From: git
Subject: [Commit-gnuradio] [gnuradio] 01/05: Merge branch 'maint_grcwg' into master_grcwg
Date: Mon, 6 Jun 2016 17:15:26 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

jcorgan pushed a commit to branch master
in repository gnuradio.

commit d8d3b8c06b5803659ef46b4257b197a49da91858
Merge: 0d32337 49e1f51
Author: Sebastian Koslowski <address@hidden>
Date:   Tue May 31 09:41:23 2016 +0200

    Merge branch 'maint_grcwg' into master_grcwg

 grc/gui/FlowGraph.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --cc grc/gui/FlowGraph.py
index 6eb05f9,cfaa6a0..f98aec4
--- a/grc/gui/FlowGraph.py
+++ b/grc/gui/FlowGraph.py
@@@ -146,11 -128,13 +147,13 @@@ class FlowGraph(Element, _Flowgraph)
          h_adj = self.get_scroll_pane().get_hadjustment()
          v_adj = self.get_scroll_pane().get_vadjustment()
          if coor is None: coor = (
-             int(random.uniform(.25, .75)*h_adj.page_size + h_adj.get_value()),
-             int(random.uniform(.25, .75)*v_adj.page_size + v_adj.get_value()),
+             int(random.uniform(.25, .75) * min(h_adj.page_size, W) +
+                 h_adj.get_value()),
+             int(random.uniform(.25, .75) * min(v_adj.page_size, H) +
+                 v_adj.get_value()),
          )
          #get the new block
 -        block = self.get_new_block(key)
 +        block = self.new_block(key)
          block.set_coordinate(coor)
          block.set_rotation(0)
          block.get_param('id').set_value(id)



reply via email to

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