diff options
-rw-r--r-- | gnuradio-runtime/lib/scheduler.h | 2 | ||||
-rw-r--r-- | grc/gui/FlowGraph.py | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/gnuradio-runtime/lib/scheduler.h b/gnuradio-runtime/lib/scheduler.h index 575862b27d..0924808965 100644 --- a/gnuradio-runtime/lib/scheduler.h +++ b/gnuradio-runtime/lib/scheduler.h @@ -45,7 +45,7 @@ namespace gr { /*! * \brief Construct a scheduler and begin evaluating the graph. * - * The scheduler will continue running until all blocks until they + * The scheduler will continue running until all blocks * report that they are done or the stop method is called. */ scheduler(flat_flowgraph_sptr ffg, int max_noutput_items); diff --git a/grc/gui/FlowGraph.py b/grc/gui/FlowGraph.py index 6eb05f9ac9..f98aec41d5 100644 --- a/grc/gui/FlowGraph.py +++ b/grc/gui/FlowGraph.py @@ -143,11 +143,14 @@ class FlowGraph(Element, _Flowgraph): """ id = self._get_unique_id(key) #calculate the position coordinate + W, H = self.get_size() 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.new_block(key) |