diff options
author | Tom Rondeau <trondeau@vt.edu> | 2013-01-22 15:52:59 -0500 |
---|---|---|
committer | Tom Rondeau <trondeau@vt.edu> | 2013-01-22 15:52:59 -0500 |
commit | 8467e541cb98226daf1402a374dc2758146ec778 (patch) | |
tree | 0a4bca14193262a6a6e9f80fa9b731a7860c05a1 /gr-qtgui/apps/plot_form.py | |
parent | 7ac2575bfd32583eea6ca1aa873626bc94e60c9a (diff) |
qtgui: prevent us from being able to set line width to 0 in the plotters.
Diffstat (limited to 'gr-qtgui/apps/plot_form.py')
-rw-r--r-- | gr-qtgui/apps/plot_form.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gr-qtgui/apps/plot_form.py b/gr-qtgui/apps/plot_form.py index 5b034407a8..72f8ca501c 100644 --- a/gr-qtgui/apps/plot_form.py +++ b/gr-qtgui/apps/plot_form.py @@ -182,11 +182,12 @@ class plot_form(QtGui.QWidget): self.connect(self._label_edit[-1], QtCore.SIGNAL("returnPressed()"), self.update_line_label) - width = self.top_block.gui_snk.line_width(n) + width_val = QtGui.QIntValidator(1, 20, self) self._size_edit.append(QtGui.QLineEdit(self)) + self._size_edit[-1].setValidator(width_val) self._size_edit[-1].setMinimumWidth(100) self._size_edit[-1].setMaximumWidth(100) - self._size_edit[-1].setText(QtCore.QString("%1").arg(width)) + self._size_edit[-1].setText(QtCore.QString("%1").arg(1)) self._line_forms[-1].addRow("Width:", self._size_edit[-1]) self.connect(self._size_edit[-1], QtCore.SIGNAL("returnPressed()"), self.update_line_size) |