BOPTools: Fix to work without the GUI
This commit is contained in:
parent
1c35bd8cd9
commit
39491713f2
|
@ -33,13 +33,12 @@ import Part
|
|||
if FreeCAD.GuiUp:
|
||||
import FreeCADGui
|
||||
from PySide import QtCore, QtGui
|
||||
|
||||
|
||||
# -------------------------- common stuff --------------------------------------------------
|
||||
|
||||
#-------------------------- translation-related code ----------------------------------------
|
||||
#Thanks, yorik! (see forum thread "A new Part tool is being born... JoinFeatures!"
|
||||
#http://forum.freecadweb.org/viewtopic.php?f=22&t=11112&start=30#p90239 )
|
||||
|
||||
try:
|
||||
_fromUtf8 = QtCore.QString.fromUtf8
|
||||
except Exception:
|
||||
|
@ -52,8 +51,12 @@ try:
|
|||
except AttributeError:
|
||||
def _translate(context, text, disambig):
|
||||
return QtGui.QApplication.translate(context, text, disambig)
|
||||
else:
|
||||
def _translate(context, text, disambig):
|
||||
return text
|
||||
#--------------------------/translation-related code ----------------------------------------
|
||||
|
||||
|
||||
def getParamRefine():
|
||||
return FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Part/Boolean").GetBool("RefineModel")
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user