← All bug reports

FS#2632CamToolDialog: Input validation does not work as expected #2

Type
Bug
Status
Assigned
Category
QCAD/CAM
Severity
Low
Priority
Low
Reported version
3.32.0
Operating system
All
Reported
2025-01-27 by Deejay

Hi Andrew,

thanks for releasing version 3.32.0. I was happy to read in the changelog about the bugfixes.
But it seems that FS#2624 is not completely fixed. I might be my fault because I posted two problems (that directly belong together) in one entry/task (sorry for that).

Below you will find the relevant information again. It is the same as the second part of FS#2624 (following item 2...):

When the CamToolDialog is created and shown, the validation function needs to be called. Otherwise the user can create a new tool with empty (invalid) values.

Example: Click on the ‘Add tool’-button to open the CAMToolDialog. Initially, the values for tool diameter, speeds and feeds are empty. But the OK button is enabled.
By clicking OK, the invalid / empty values are taken for the new tool without error.

Suggested fix: The validation function should be called once after the dialog has been created / shown. This should show the according error messages and disable the OK button.

Workaround until the bug is fixed:
Overwrite the function CamToolDialog.prototype.afterShow in your postprocessor script and call the according validate function:

CamToolDialog.prototype.afterShow = function() {

CamToolDialog.prototype.validate.call(this);
return true;

}

Please let me know if you need more details.
Regards,
Deejay