Preference setting so suppress logging the selection mode as a warning.
This commit is contained in:
@@ -68,6 +68,7 @@ void DlgSettingsPathColor::saveSettings()
|
||||
ui->DefaultSelectionStyle->onSave();
|
||||
ui->DefaultTaskPanelLayout->onSave();
|
||||
ui->WarningSuppressRapidSpeeds->onSave();
|
||||
ui->WarningSuppressSelectionMode->onSave();
|
||||
}
|
||||
|
||||
void DlgSettingsPathColor::loadSettings()
|
||||
@@ -85,6 +86,7 @@ void DlgSettingsPathColor::loadSettings()
|
||||
ui->DefaultSelectionStyle->onRestore();
|
||||
ui->DefaultTaskPanelLayout->onRestore();
|
||||
ui->WarningSuppressRapidSpeeds->onRestore();
|
||||
ui->WarningSuppressSelectionMode->onRestore();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -471,6 +471,22 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Gui::PrefCheckBox" name="WarningSuppressSelectionMode">
|
||||
<property name="toolTip">
|
||||
<string>Suppress warning whenever a Path selection mode is activated</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Suppress selection mode warning</string>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>WarningSuppressSelectionMode</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Path</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -58,6 +58,7 @@ GeometryTolerance = "GeometryTolerance"
|
||||
LibAreaCurveAccuracy = "LibAreaCurveAccuarcy"
|
||||
|
||||
WarningSuppressRapidSpeeds = "WarningSuppressRapidSpeeds"
|
||||
WarningSuppressSelectionMode = "WarningSuppressSelectionMode"
|
||||
EnableExperimentalFeatures = "EnableExperimentalFeatures"
|
||||
|
||||
|
||||
@@ -263,6 +264,9 @@ def experimentalFeaturesEnabled():
|
||||
def suppressRapidSpeedsWarning():
|
||||
return preferences().GetBool(WarningSuppressRapidSpeeds, False)
|
||||
|
||||
def suppressSelectionModeWarning():
|
||||
return preferences().GetBool(WarningSuppressSelectionMode, False)
|
||||
|
||||
|
||||
def lastFileToolLibrary():
|
||||
filename = preferences().GetString(LastFileToolLibrary)
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
import PathScripts.PathLog as PathLog
|
||||
import PathScripts.PathPreferences as PathPreferences
|
||||
import PathScripts.PathUtils as PathUtils
|
||||
import math
|
||||
|
||||
@@ -286,52 +287,62 @@ class ALLGate(PathBaseGate):
|
||||
|
||||
def contourselect():
|
||||
FreeCADGui.Selection.addSelectionGate(CONTOURGate())
|
||||
FreeCAD.Console.PrintWarning("Contour Select Mode\n")
|
||||
if not PathPreferences.suppressSelectionModeWarning():
|
||||
FreeCAD.Console.PrintWarning("Contour Select Mode\n")
|
||||
|
||||
|
||||
def eselect():
|
||||
FreeCADGui.Selection.addSelectionGate(EGate())
|
||||
FreeCAD.Console.PrintWarning("Edge Select Mode\n")
|
||||
if not PathPreferences.suppressSelectionModeWarning():
|
||||
FreeCAD.Console.PrintWarning("Edge Select Mode\n")
|
||||
|
||||
|
||||
def drillselect():
|
||||
FreeCADGui.Selection.addSelectionGate(DRILLGate())
|
||||
FreeCAD.Console.PrintWarning("Drilling Select Mode\n")
|
||||
if not PathPreferences.suppressSelectionModeWarning():
|
||||
FreeCAD.Console.PrintWarning("Drilling Select Mode\n")
|
||||
|
||||
|
||||
def engraveselect():
|
||||
FreeCADGui.Selection.addSelectionGate(ENGRAVEGate())
|
||||
FreeCAD.Console.PrintWarning("Engraving Select Mode\n")
|
||||
if not PathPreferences.suppressSelectionModeWarning():
|
||||
FreeCAD.Console.PrintWarning("Engraving Select Mode\n")
|
||||
|
||||
|
||||
def fselect():
|
||||
FreeCADGui.Selection.addSelectionGate(FACEGate()) # Was PROFILEGate()
|
||||
FreeCAD.Console.PrintWarning("Profiling Select Mode\n")
|
||||
if not PathPreferences.suppressSelectionModeWarning():
|
||||
FreeCAD.Console.PrintWarning("Profiling Select Mode\n")
|
||||
|
||||
|
||||
def chamferselect():
|
||||
FreeCADGui.Selection.addSelectionGate(CHAMFERGate())
|
||||
FreeCAD.Console.PrintWarning("Deburr Select Mode\n")
|
||||
if not PathPreferences.suppressSelectionModeWarning():
|
||||
FreeCAD.Console.PrintWarning("Deburr Select Mode\n")
|
||||
|
||||
|
||||
def profileselect():
|
||||
FreeCADGui.Selection.addSelectionGate(PROFILEGate())
|
||||
FreeCAD.Console.PrintWarning("Profiling Select Mode\n")
|
||||
if not PathPreferences.suppressSelectionModeWarning():
|
||||
FreeCAD.Console.PrintWarning("Profiling Select Mode\n")
|
||||
|
||||
|
||||
def pocketselect():
|
||||
FreeCADGui.Selection.addSelectionGate(POCKETGate())
|
||||
FreeCAD.Console.PrintWarning("Pocketing Select Mode\n")
|
||||
if not PathPreferences.suppressSelectionModeWarning():
|
||||
FreeCAD.Console.PrintWarning("Pocketing Select Mode\n")
|
||||
|
||||
|
||||
def adaptiveselect():
|
||||
FreeCADGui.Selection.addSelectionGate(ADAPTIVEGate())
|
||||
FreeCAD.Console.PrintWarning("Adaptive Select Mode\n")
|
||||
if not PathPreferences.suppressSelectionModeWarning():
|
||||
FreeCAD.Console.PrintWarning("Adaptive Select Mode\n")
|
||||
|
||||
|
||||
def slotselect():
|
||||
FreeCADGui.Selection.addSelectionGate(ALLGate())
|
||||
FreeCAD.Console.PrintWarning("Slot Cutter Select Mode\n")
|
||||
if not PathPreferences.suppressSelectionModeWarning():
|
||||
FreeCAD.Console.PrintWarning("Slot Cutter Select Mode\n")
|
||||
|
||||
|
||||
def surfaceselect():
|
||||
@@ -339,26 +350,31 @@ def surfaceselect():
|
||||
if(MESHGate() or FACEGate()):
|
||||
gate = True
|
||||
FreeCADGui.Selection.addSelectionGate(gate)
|
||||
FreeCAD.Console.PrintWarning("Surfacing Select Mode\n")
|
||||
if not PathPreferences.suppressSelectionModeWarning():
|
||||
FreeCAD.Console.PrintWarning("Surfacing Select Mode\n")
|
||||
|
||||
|
||||
def vcarveselect():
|
||||
FreeCADGui.Selection.addSelectionGate(VCARVEGate())
|
||||
FreeCAD.Console.PrintWarning("Vcarve Select Mode\n")
|
||||
if not PathPreferences.suppressSelectionModeWarning():
|
||||
FreeCAD.Console.PrintWarning("Vcarve Select Mode\n")
|
||||
|
||||
|
||||
def probeselect():
|
||||
FreeCADGui.Selection.addSelectionGate(PROBEGate())
|
||||
FreeCAD.Console.PrintWarning("Probe Select Mode\n")
|
||||
if not PathPreferences.suppressSelectionModeWarning():
|
||||
FreeCAD.Console.PrintWarning("Probe Select Mode\n")
|
||||
|
||||
|
||||
def customselect():
|
||||
FreeCAD.Console.PrintWarning("Custom Select Mode\n")
|
||||
if not PathPreferences.suppressSelectionModeWarning():
|
||||
FreeCAD.Console.PrintWarning("Custom Select Mode\n")
|
||||
|
||||
|
||||
def turnselect():
|
||||
FreeCADGui.Selection.addSelectionGate(TURNGate())
|
||||
FreeCAD.Console.PrintWarning("Turning Select Mode\n")
|
||||
if not PathPreferences.suppressSelectionModeWarning():
|
||||
FreeCAD.Console.PrintWarning("Turning Select Mode\n")
|
||||
|
||||
|
||||
def select(op):
|
||||
@@ -392,4 +408,5 @@ def select(op):
|
||||
|
||||
def clear():
|
||||
FreeCADGui.Selection.removeSelectionGate()
|
||||
FreeCAD.Console.PrintWarning("Free Select\n")
|
||||
if not PathPreferences.suppressSelectionModeWarning():
|
||||
FreeCAD.Console.PrintWarning("Free Select\n")
|
||||
|
||||
Reference in New Issue
Block a user