FEM: Fix cursor error

FEM wb was throwing errors:
X Error: BadCursor (invalid Cursor parameter) 6
  Major opcode: 2 (X_ChangeWindowAttributes)
  Resource id:  0x3
X Error: BadCursor (invalid Cursor parameter) 6
  Major opcode: 2 (X_ChangeWindowAttributes)
  Resource id:  0x3
X Error: BadCursor (invalid Cursor parameter) 6
  Major opcode: 95 (X_FreeCursor)
  Resource id:  0x3

according to this [1] that patch should not make any change for windows
and fixes the problem on linux.

[1] https://bugreports.qt.io/browse/PYSIDE-243

Signed-off-by: Przemo Firszt <przemo@firszt.eu>
This commit is contained in:
Przemo Firszt 2015-03-17 21:26:26 +00:00 committed by wmayer
parent ff667115e1
commit 41539d672b

View File

@ -285,7 +285,7 @@ class _JobControlTaskPanel:
self.form.label_Time.setText('Time: {0:4.1f}: '.format(time.time() - self.Start) )
if os.path.isfile(self.Basename + '.frd'):
QApplication.setOverrideCursor(QCursor(Qt.WaitCursor))
QApplication.setOverrideCursor(Qt.WaitCursor)
CalculixLib.importFrd(self.Basename + '.frd',FemGui.getActiveAnalysis() )
QApplication.restoreOverrideCursor()
self.femConsoleMessage("Loading results done!", "#00FF00")
@ -362,7 +362,7 @@ class _JobControlTaskPanel:
QtGui.QMessageBox.critical(None, "Missing prerequisit","No force-constraint nodes defined in the Analysis")
return
QApplication.setOverrideCursor(QCursor(Qt.WaitCursor))
QApplication.setOverrideCursor(Qt.WaitCursor)
self.Basename = self.TempDir + '/' + MeshObject.Name
filename = self.Basename + '.inp'
@ -575,7 +575,7 @@ class _ResultControlTaskPanel:
self.MeshObject.ViewObject.ElementColor = {}
return
QtGui.qApp.setOverrideCursor(QtCore.Qt.WaitCursor)
QApplication.setOverrideCursor(Qt.WaitCursor)
if typeName[:2] == "Ua" and self.DisplacementObject:
(min,max,avg) = self.MeshObject.ViewObject.setNodeColorByResult(self.DisplacementObject)
@ -598,7 +598,7 @@ class _ResultControlTaskPanel:
def showDisplacementClicked(self,bool):
QtGui.qApp.setOverrideCursor(QtCore.Qt.WaitCursor)
QApplication.setOverrideCursor(Qt.WaitCursor)
self.setDisplacement()
QtGui.qApp.restoreOverrideCursor()