From cf971d6a872c34b65ce51925540071867e786ee5 Mon Sep 17 00:00:00 2001 From: Marcel Paffrath Date: Fri, 19 May 2017 09:23:02 +0200 Subject: [PATCH] Mainwindow plotWidget size fix --- QtPyLoT.py | 14 ++++++++------ pylot/RELEASE-VERSION | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/QtPyLoT.py b/QtPyLoT.py index 43700544..f8296834 100755 --- a/QtPyLoT.py +++ b/QtPyLoT.py @@ -743,7 +743,7 @@ class MainWindow(QMainWindow): for item in itemlist: item.setEnabled(False) model.appendRow(itemlist) - if not event.path == self.eventBox.itemText(id): + if not event.path == self.eventBox.itemText(id).strip(): message = ('Path missmatch creating eventbox.\n' '{} unequal {}.' .format(event.path, self.eventBox.itemText(id))) @@ -1039,17 +1039,19 @@ class MainWindow(QMainWindow): wfst += self.get_data().getWFData().select(component=alter_comp) height_need = len(self.data.getWFData())*12 plotWidget = self.getPlotWidget() - if plotWidget.frameSize().height() < height_need: - plotWidget.setFixedHeight(height_need) + if self.tabs.widget(0).frameSize().height() < height_need: + plotWidget.setMinimumHeight(height_need) else: - plotWidget.setFixedHeight(plotWidget.frameSize().height()) - plotWidget.figure.tight_layout() + plotWidget.setMinimumHeight(0) plotWidget.plotWFData(wfdata=wfst, title=title, mapping=False) plotDict = plotWidget.getPlotDict() pos = plotDict.keys() labels = [plotDict[n][0] for n in pos] plotWidget.setYTickLabels(pos, labels) - plotWidget.figure.tight_layout() + try: + plotWidget.figure.tight_layout() + except: + pass def plotZ(self): self.setComponent('Z') diff --git a/pylot/RELEASE-VERSION b/pylot/RELEASE-VERSION index 149f693f..d38e686d 100644 --- a/pylot/RELEASE-VERSION +++ b/pylot/RELEASE-VERSION @@ -1 +1 @@ -f814-dirty +1143-dirty