Draft: change static to non-static declared variables (#5292)

* Draft: change static to non-static declared variables

* Change variable name and add some comment
This commit is contained in:
Mariwan
2022-01-05 16:39:28 +01:00
committed by GitHub
parent c93c0e6aaf
commit 122deb98fb
2 changed files with 5 additions and 5 deletions

View File

@@ -699,7 +699,7 @@ class ghostTracker(Tracker):
obj.ViewObject.show()
self.finalize()
sep = self.getNode(obj)
Tracker.__init__(self, children=[self.sep])
Tracker.__init__(self, children=[sep])
self.on()
obj.ViewObject.hide()

View File

@@ -50,8 +50,6 @@ True if Draft_rc.__name__ else False
class ShapeStringTaskPanel:
"""TaskPanel for Draft_ShapeString."""
oldValueBuffer = False
def __init__(self):
self.form = QtGui.QWidget()
self.form.setObjectName("ShapeStringTaskPanel")
@@ -79,6 +77,8 @@ class ShapeStringTaskPanel:
self.fileSpec = Draft.getParam("FontFile", "")
self.point = App.Vector(0.0, 0.0, 0.0)
self.pointPicked = False
# Default for the "DontUseNativeFontDialog" preference:
self.font_dialog_pref = False
QtCore.QObject.connect(self.task.fcFontFile, QtCore.SIGNAL("fileNameSelected(const QString&)"), self.fileSelect)
QtCore.QObject.connect(self.task.pbReset, QtCore.SIGNAL("clicked()"), self.resetPoint)
@@ -164,11 +164,11 @@ class ShapeStringTaskPanel:
ParamGroup.SetBool("DontUseNativeFontDialog", True)
param = ParamGroup.GetBool("DontUseNativeFontDialog")
self.oldValueBuffer = ParamGroup.GetBool("DontUseNativeDialog")
self.font_dialog_pref = ParamGroup.GetBool("DontUseNativeDialog")
ParamGroup.SetBool("DontUseNativeDialog", param)
elif flag == "Restore":
ParamGroup.SetBool("DontUseNativeDialog", self.oldValueBuffer)
ParamGroup.SetBool("DontUseNativeDialog", self.font_dialog_pref)
def accept(self):
"""Execute when clicking the OK button."""