Merge pull request #386 from GridSpace/fix-register-warning

stop drill warnings for register ops
This commit is contained in:
Josiah Hamm 2025-06-12 10:26:58 -06:00 • committed by GitHub
commit 0239013f2e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1968,10 +1968,12 @@ function createPopOp(type, map) {
const settings = conf.get();
const {tool} = new CAM.Tool(settings,op.rec.tool); //get tool by id
const opType = op.rec.type
if( opType != "drill" && tool.type == "drill"){
const drillOrRegister = opType == "drill" || opType == "register"
if ( !drillOrRegister && tool.type == "drill"){
alerts.show(`Warning: Drills should not be used for ${opType} operations.`)
}
else if( opType == "drill" && tool.type != "drill"){
else if ( drillOrRegister && tool.type != "drill"){
alerts.show(`Warning: Only drills should be used for drilling operations.`)
}