Skip to content

Commit

Permalink
Fixed PySide pitfall
Browse files Browse the repository at this point in the history
  • Loading branch information
sanguinariojoe authored and wwmayer committed May 3, 2014
1 parent e7c3e26 commit 751f40c
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions src/Mod/Ship/shipHydrostatics/TaskPanel.py
Expand Up @@ -48,9 +48,16 @@ def accept(self):
return
self.save()

min_draft = self.form.minDraft.value()
max_draft = self.form.maxDraft.value()
n_draft = self.form.nDraft.value()
mw = self.getMainWindow()
form = mw.findChild(QtGui.QWidget, "TaskPanel")
form.trim = self.widget(QtGui.QDoubleSpinBox, "Trim")
form.minDraft = self.widget(QtGui.QDoubleSpinBox, "MinDraft")
form.maxDraft = self.widget(QtGui.QDoubleSpinBox, "MaxDraft")
form.nDraft = self.widget(QtGui.QSpinBox, "NDraft")

min_draft = form.minDraft.value()
max_draft = form.maxDraft.value()
n_draft = form.nDraft.value()

draft = min_draft
drafts = [draft]
Expand Down Expand Up @@ -95,13 +102,13 @@ def accept(self):
point = Tools.Point(self.ship,
faces,
draft,
self.form.trim.value())
form.trim.value())
points.append(point)
self.timer.start(0.0)
self.loop.exec_()
if(not self.running):
break
PlotAux.Plot(self.ship, self.form.trim.value(), points)
PlotAux.Plot(self.ship, form.trim.value(), points)
return True

def reject(self):
Expand Down

0 comments on commit 751f40c

Please sign in to comment.