diff options
-rw-r--r-- | cmake/Modules/GrSetupQt4.cmake | 8 | ||||
-rw-r--r-- | gnuradio-runtime/lib/scheduler.h | 2 | ||||
-rw-r--r-- | grc/gui/FlowGraph.py | 7 |
3 files changed, 13 insertions, 4 deletions
diff --git a/cmake/Modules/GrSetupQt4.cmake b/cmake/Modules/GrSetupQt4.cmake index cc85c39601..312b415de9 100644 --- a/cmake/Modules/GrSetupQt4.cmake +++ b/cmake/Modules/GrSetupQt4.cmake @@ -67,7 +67,13 @@ set(__INCLUDED_GR_USEQT4_CMAKE TRUE) ################################################################ ADD_DEFINITIONS(${QT_DEFINITIONS}) -SET_PROPERTY(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS $<$<NOT:$<CONFIG:Debug>>:QT_NO_DEBUG>) +SET_PROPERTY(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG QT_DEBUG) +SET_PROPERTY(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELEASE QT_NO_DEBUG) +SET_PROPERTY(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO QT_NO_DEBUG) +SET_PROPERTY(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_MINSIZEREL QT_NO_DEBUG) +IF(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE) + SET_PROPERTY(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS QT_NO_DEBUG) +ENDIF() SET(QT_INCLUDE_DIRS ${QT_INCLUDE_DIR}) SET(QT_LIBRARIES "") 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) |