From 419f51495124daa6612dc84ab299b3c866316f93 Mon Sep 17 00:00:00 2001 From: easyw <3032347+easyw@users.noreply.github.com> Date: Thu, 3 Oct 2019 22:49:38 +0200 Subject: [PATCH] fixing error on startup CQ_Logo.svg does not exists fixing error on startup CQ_Logo.svg does not exists https://github.com/jmwright/cadquery-freecad-module/issues/140 --- InitGui.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/InitGui.py b/InitGui.py index 6b5e636..bf612b5 100644 --- a/InitGui.py +++ b/InitGui.py @@ -11,9 +11,14 @@ import CadQuery_rc class CadQueryWorkbench (Workbench): """CadQuery workbench for FreeCAD""" """CadQuery workbench for FreeCAD""" + import os + try: + from . import module_locator + except: + import module_locator MenuText = "CadQuery" ToolTip = "CadQuery workbench" - Icon = ":/icons/CQ_Logo.svg" + Icon = module_locator.module_path()+"/CQGui/Resources/icons/CQ_Logo.svg" #Keeps track of which workbenches we have hidden so we can reshow them closedWidgets = []