Browse Source

Fix (hack) for plot update on filter design using MacOS. This is due to known bug in Qt on Mac

tags/1.6.1
Trevor Irons 5 years ago
parent
commit
8f961f5707
2 changed files with 15 additions and 5 deletions
  1. 13
    4
      akvo/gui/akvoGUI.py
  2. 2
    1
      akvo/tressel/mrsurvey.py

+ 13
- 4
akvo/gui/akvoGUI.py View File

@@ -1252,13 +1252,17 @@ class ApplicationWindow(QtWidgets.QMainWindow):
1252 1252
                 self.ui.gpassSpinBox.value(), \
1253 1253
                 self.ui.gstopSpinBox.value(), \
1254 1254
                 str(self.ui.fTypeComboBox.currentText()),
1255
-                self.ui.mplwidget)
1255
+                self.ui.mplwidget
1256
+        )
1256 1257
         self.ui.lcdNumberFilterOrder.display(bord)
1257 1258
         self.ui.lcdNumberFTauDead.display(1e3*fe)
1258
-        #self.ui.lcdNumberFilterOrder.display(bord)
1259 1259
         self.ui.bandPassGO.setEnabled(1)
1260
-        #   self.ui.lcdNumberTauPulse2.display(1e3*self.RAWDataProc.pulseLength[1])
1261
-    
1260
+        # Hack for MacOS to force refresh of group box and plot
1261
+        self.ui.mplwidget.hide()
1262
+        self.ui.mplwidget.show()
1263
+        self.ui.BandPassBox.hide()
1264
+        self.ui.BandPassBox.show()
1265
+ 
1262 1266
     def windowFilter(self):
1263 1267
         
1264 1268
         if "Window filter" not in self.YamlNode.Processing.keys():
@@ -1295,6 +1299,11 @@ class ApplicationWindow(QtWidgets.QMainWindow):
1295 1299
                 self.ui.mplwidget )
1296 1300
 
1297 1301
         self.ui.lcdWinDead.display(dead)
1302
+        # Hack for MacOS to force refresh of group box and plot
1303
+        self.ui.mplwidget.hide()
1304
+        self.ui.mplwidget.show()
1305
+        self.ui.windowFilterGroupBox.hide()
1306
+        self.ui.windowFilterGroupBox.show()
1298 1307
 
1299 1308
     def updateProgressBar(self, percent):
1300 1309
         self.ui.barProgress.setValue(percent)

+ 2
- 1
akvo/tressel/mrsurvey.py View File

@@ -1893,7 +1893,8 @@ class GMRDataProcessor(SNMRDataProcessor):
1893 1893
         for it in range(len(impulse[0])):
1894 1894
             if abs(impulse[1][0][it][0]) >= .1 * gpass:# gpass:
1895 1895
                 self.fe = impulse[0][it]
1896
-           
1896
+         
1897
+        canvas.draw() 
1897 1898
         return [bord, self.fe] 
1898 1899
 
1899 1900
     def downsample(self, truncate, dec, plot, canvas):

Loading…
Cancel
Save