Commit a2c7a35f authored by Damien Naudet's avatar Damien Naudet
Browse files

sizehint for the roiwidget

parent 2199911a
......@@ -58,10 +58,9 @@ class RectRoiWidget(Qt.QWidget):
# support multiple ROIs then batch them
super(RectRoiWidget, self).__init__(parent)
roiToolBar = roiManager.toolBar(rois=['rectangle'],
self.__roiToolBar = roiToolBar = roiManager.toolBar(rois=['rectangle'],
options=['show'])
roiToolBar.setMovable(False)
roiToolBar.addSeparator()
topLayout = Qt.QVBoxLayout(self)
......@@ -137,6 +136,9 @@ class RectRoiWidget(Qt.QWidget):
roiManager.sigRoiMoved.connect(self.__roiMoved,
Qt.Qt.QueuedConnection)
def sizeHint(self):
return Qt.QSize(self.__roiToolBar.sizeHint().width() + 10, 0)
def __discardRoi(self, checked):
self.__roiManager.clear()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment