Dialog from dialog fixed
This commit is contained in:
parent
bcb0f61747
commit
df8b716c5c
1 changed files with 5 additions and 4 deletions
|
@ -356,7 +356,6 @@ class FeatureFramePanel:
|
||||||
QtCore.QObject.connect(self.form.ChoicesBox,
|
QtCore.QObject.connect(self.form.ChoicesBox,
|
||||||
QtCore.SIGNAL("currentIndexChanged(QString)"),
|
QtCore.SIGNAL("currentIndexChanged(QString)"),
|
||||||
self.choiceChanged)
|
self.choiceChanged)
|
||||||
# Setting up relevant illustrations
|
|
||||||
self.scenes = {}
|
self.scenes = {}
|
||||||
for choice in self.choices:
|
for choice in self.choices:
|
||||||
sc = QtGui.QGraphicsScene()
|
sc = QtGui.QGraphicsScene()
|
||||||
|
@ -376,10 +375,12 @@ class FeatureFramePanel:
|
||||||
"PointOnSurface": PointOnSurfacePanel,
|
"PointOnSurface": PointOnSurfacePanel,
|
||||||
"Center": CenterPanel,
|
"Center": CenterPanel,
|
||||||
"PointOnCenterline": PointOnCenterlinePanel}
|
"PointOnCenterline": PointOnCenterlinePanel}
|
||||||
new_panel = paneldict[sel_choice](self.selected, self.so_desc)
|
pan = paneldict[sel_choice](self.selected, self.so_desc)
|
||||||
############## PROBLEM HERE ##################
|
|
||||||
FreeCADGui.Control.closeDialog()
|
FreeCADGui.Control.closeDialog()
|
||||||
FreeCADGui.Control.showDialog(new_panel)
|
# The dialog is actually closed after the accept function has
|
||||||
|
# completed. So we need to use a delayed task to open the new dialog:
|
||||||
|
QtCore.QTimer.singleShot(0,
|
||||||
|
lambda: FreeCADGui.Control.showDialog(pan))
|
||||||
|
|
||||||
def reject(self):
|
def reject(self):
|
||||||
FreeCADGui.Control.closeDialog()
|
FreeCADGui.Control.closeDialog()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue