Commit a312f759 authored by Valentin Valls's avatar Valentin Valls
Browse files

Make curve property a bit more resilient

parent 179b17e7
......@@ -902,8 +902,8 @@ class CurvePlotPropertyWidget(qt.QWidget):
else:
plotModel = None
scanModel = None
self.__plotModelUpdated(plotModel)
self.__currentScanChanged(scanModel)
self.__plotModelUpdated(plotModel)
def __plotModelUpdated(self, plotModel):
self.setPlotModel(plotModel)
......@@ -1074,6 +1074,10 @@ class CurvePlotPropertyWidget(qt.QWidget):
model = self.__tree.model()
model.clear()
if self.__plotModel is None:
return
if self.__scan is None:
return
if self.__plotModel is None:
model.setHorizontalHeaderLabels([""])
......
......@@ -449,7 +449,6 @@ class StylePropertyWidget(qt.QWidget):
self.__legend.setLineStyle(lineStyle)
self.__legend.setLineWidth(1.5)
except Exception:
_logger.error("Error while reaching style", exc_info=True)
self.__legend.setLineColor("grey")
self.__legend.setLineStyle(":")
self.__legend.setLineWidth(1.5)
......
Supports Markdown
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