Merge pull request #12230 from kpemartin/Issue11876
Remove excessive output from Draft object creation and editing
This commit is contained in:
@@ -43,7 +43,7 @@ from draftutils import gui_utils
|
||||
from draftutils import params
|
||||
from draftutils import todo
|
||||
from draftutils import utils
|
||||
from draftutils.messages import _log, _msg, _toolmsg
|
||||
from draftutils.messages import _log, _toolmsg
|
||||
|
||||
|
||||
class DraftTool:
|
||||
|
||||
@@ -51,7 +51,7 @@ import DraftVecUtils
|
||||
|
||||
from draftutils.translate import translate
|
||||
import draftutils.utils as utils
|
||||
from draftutils.messages import _msg
|
||||
from draftutils.messages import _err
|
||||
|
||||
import draftguitools.gui_trackers as trackers
|
||||
|
||||
@@ -174,8 +174,7 @@ class DraftWireGuiTools(GuiTools):
|
||||
|
||||
def delete_point(self, obj, node_idx):
|
||||
if len(obj.Points) <= 2:
|
||||
_msg = translate("draft", "Active object must have more than two points/nodes")
|
||||
App.Console.PrintWarning(_msg + "\n")
|
||||
_err(translate("draft", "Active object must have more than two points/nodes"))
|
||||
return
|
||||
|
||||
pts = obj.Points
|
||||
@@ -837,8 +836,7 @@ class DraftBezCurveGuiTools(GuiTools):
|
||||
|
||||
def delete_point(self, obj, node_idx):
|
||||
if len(obj.Points) <= 2:
|
||||
_msg = translate("draft", "Active object must have more than two points/nodes")
|
||||
App.Console.PrintWarning(_msg + "\n")
|
||||
_err(translate("draft", "Active object must have more than two points/nodes"))
|
||||
return
|
||||
|
||||
pts = obj.Points
|
||||
|
||||
@@ -43,7 +43,7 @@ import draftutils.utils as utils
|
||||
import draftguitools.gui_base_original as gui_base_original
|
||||
import draftguitools.gui_tool_utils as gui_tool_utils
|
||||
|
||||
from draftutils.messages import _msg, _err, _toolmsg
|
||||
from draftutils.messages import _err, _toolmsg
|
||||
from draftutils.translate import translate
|
||||
|
||||
# The module is used to prevent complaints from code checkers (flake8)
|
||||
|
||||
@@ -44,7 +44,7 @@ from draftutils import gui_utils
|
||||
from draftutils import params
|
||||
from draftutils import utils
|
||||
from draftutils import todo
|
||||
from draftutils.messages import _err, _msg, _toolmsg
|
||||
from draftutils.messages import _err, _toolmsg
|
||||
from draftutils.translate import translate
|
||||
|
||||
|
||||
|
||||
@@ -229,7 +229,6 @@ class Offset(gui_base_original.Modifier):
|
||||
copymode = True
|
||||
Gui.addModule("Draft")
|
||||
if self.npts:
|
||||
# _msg("offset:npts= " + str(self.npts))
|
||||
_cmd = 'Draft.offset'
|
||||
_cmd += '('
|
||||
_cmd += 'FreeCAD.ActiveDocument.'
|
||||
|
||||
@@ -36,7 +36,7 @@ import Draft
|
||||
import Draft_rc # include resources, icons, ui files
|
||||
import draftutils.todo as todo
|
||||
|
||||
from draftutils.messages import _msg, _log
|
||||
from draftutils.messages import _log
|
||||
from draftutils.translate import translate
|
||||
from draftguitools import gui_base
|
||||
from drafttaskpanels import task_orthoarray
|
||||
@@ -72,8 +72,6 @@ class OrthoArray(gui_base.GuiCommandBase):
|
||||
the widgets of the task panel.
|
||||
"""
|
||||
_log("GuiCommand: {}".format(self.command_name))
|
||||
#_msg("{}".format(16*"-"))
|
||||
#_msg("GuiCommand: {}".format(self.command_name))
|
||||
|
||||
# self.location = coin.SoLocation2Event.getClassTypeId()
|
||||
self.mouse_event = coin.SoMouseButtonEvent.getClassTypeId()
|
||||
|
||||
@@ -36,7 +36,7 @@ import Draft
|
||||
import Draft_rc # include resources, icons, ui files
|
||||
import draftutils.todo as todo
|
||||
|
||||
from draftutils.messages import _msg, _log
|
||||
from draftutils.messages import _log
|
||||
from draftutils.translate import translate
|
||||
from draftguitools import gui_base
|
||||
from drafttaskpanels import task_polararray
|
||||
@@ -72,8 +72,6 @@ class PolarArray(gui_base.GuiCommandBase):
|
||||
the widgets of the task panel.
|
||||
"""
|
||||
_log("GuiCommand: {}".format(self.command_name))
|
||||
#_msg("{}".format(16*"-"))
|
||||
#_msg("GuiCommand: {}".format(self.command_name))
|
||||
|
||||
self.location = coin.SoLocation2Event.getClassTypeId()
|
||||
self.mouse_event = coin.SoMouseButtonEvent.getClassTypeId()
|
||||
|
||||
@@ -445,7 +445,7 @@ class bsplineTracker(Tracker):
|
||||
except Exception:
|
||||
# workaround for pivy SoInput.setBuffer() bug
|
||||
buf = buf.replace("\n", "")
|
||||
pts = re.findall("point \[(.*?)\]", buf)[0]
|
||||
pts = re.findall("point \\[(.*?)\\]", buf)[0]
|
||||
pts = pts.split(",")
|
||||
pc = []
|
||||
for p in pts:
|
||||
@@ -523,7 +523,7 @@ class bezcurveTracker(Tracker):
|
||||
except Exception:
|
||||
# workaround for pivy SoInput.setBuffer() bug
|
||||
buf = buf.replace("\n","")
|
||||
pts = re.findall("point \[(.*?)\]", buf)[0]
|
||||
pts = re.findall("point \\[(.*?)\\]", buf)[0]
|
||||
pts = pts.split(",")
|
||||
pc = []
|
||||
for p in pts:
|
||||
@@ -652,7 +652,7 @@ class arcTracker(Tracker):
|
||||
except Exception:
|
||||
# workaround for pivy SoInput.setBuffer() bug
|
||||
buf = buf.replace("\n", "")
|
||||
pts = re.findall("point \[(.*?)\]", buf)[0]
|
||||
pts = re.findall("point \\[(.*?)\\]", buf)[0]
|
||||
pts = pts.split(",")
|
||||
pc = []
|
||||
for p in pts:
|
||||
|
||||
Reference in New Issue
Block a user