Skip to content

Commit

Permalink
FEM: Fix cursor error
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
PrzemoF authored and wwmayer committed Mar 21, 2015
1 parent ff66711 commit 41539d6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Mod/Fem/MechanicalAnalysis.py
Expand Up @@ -285,7 +285,7 @@ def calculixFinished(self,exitCode):
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")
Expand Down Expand Up @@ -362,7 +362,7 @@ def writeCalculixInputFile(self):
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'
Expand Down Expand Up @@ -575,7 +575,7 @@ def typeChanged(self,typeName):
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)
Expand All @@ -598,7 +598,7 @@ def typeChanged(self,typeName):


def showDisplacementClicked(self,bool):
QtGui.qApp.setOverrideCursor(QtCore.Qt.WaitCursor)
QApplication.setOverrideCursor(Qt.WaitCursor)
self.setDisplacement()
QtGui.qApp.restoreOverrideCursor()

Expand Down

0 comments on commit 41539d6

Please sign in to comment.