Skip to content

Commit

Permalink
Patches added for Freecad 0.18.1
Browse files Browse the repository at this point in the history
  • Loading branch information
hamish2014 committed May 7, 2019
1 parent c191c55 commit 4be20f6
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
Binary file modified Gui/Resources/dd_resources.rcc
Binary file not shown.
21 changes: 14 additions & 7 deletions InitGui.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,20 @@ def Initialize(self):
self.appendToolbar('Drawing Workbench shortcuts', newpageShortcuts + [
'dd_new_drawing_page_preferences',
'dd_Drawing_OrthoViews',
] )
] )
# copy the Drawing toolbar
import DrawingGui
self.appendToolbar('Drawing Workbench Commands',["Drawing_NewPage",
"Drawing_NewView","Drawing_OrthoViews","Drawing_OpenBrowserView",
"Drawing_Annotation","Drawing_Clip","Drawing_Symbol",
"Drawing_DraftView","Drawing_ExportPage"])
self.appendToolbar('Drawing Workbench Commands',[
"Drawing_NewPage",
"Drawing_NewView",
"Drawing_OrthoViews",
"Drawing_OpenBrowserView",
"Drawing_Annotation",
"Drawing_Clip",
"Drawing_Symbol",
"Drawing_DraftView",
"Drawing_ExportPage"
])

commandslist = [
'dd_linearDimension', #where dd is short-hand for drawing dimensioning
Expand Down Expand Up @@ -44,12 +51,12 @@ def Initialize(self):
]
self.appendToolbar( 'Drawing Dimensioning Folding', unfold_cmds )
from drawingDimensioning import weldingSymbols
freecad_version = int( FreeCAD.Version()[1] )
freecad_version = float( FreeCAD.Version()[1] )
try:
git_commit_no = int( FreeCAD.Version()[2].split()[0] )
except:
git_commit_no = -1
freecad_version = int( FreeCAD.Version()[1] )
# freecad_version = int( FreeCAD.Version()[1] )
if git_commit_no > 5166 or freecad_version > 15:
weldingCommandList = ['dd_weldingGroupCommand']
else:
Expand Down
10 changes: 5 additions & 5 deletions drawingDimensioning/py3_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ def translate(*args):
return QtGui.QApplication.translate(args[0], args[1], args[2])

def encode_if_py2(unicode_object):
'''return unicode for py3 and bytes for py2'''
if sys.version_info.major < 3:
return unicode_object.decode("utf8")
else:
return unicode_object
'''return unicode for py3 and bytes for py2'''
if sys.version_info.major < 3:
return unicode_object.encode("utf8")
else:
return unicode_object

_map = map

Expand Down

0 comments on commit 4be20f6

Please sign in to comment.