Open slspencer opened 1 week ago
- Select a new measurement file.
- Open the selected measurement file in SeamlyMe. If selected, ask the user whether to add the missing measurements, Y/N automatically.
- Close and return to Seamly2D.
Doesn't quite work that way. You have to keep in mind that Seamly2D can be running from a command line with no GUI, and you have to account for that. If Seamly is running from the command line and it can't find the measurement file it has to abort - thus the File excpetion. The problem is the loadPattern(), checkPathToMeasurments(), and checkRequiredMeasurements() methods are a mess. Since the gui/nogui modes here are coupled together, even when in gui mode it throws the file exception if there are missing measurements, rather than taking a more graceful course of action. And actually throwing the exception in no GUI mode makes no sense as there is no GUI to see the message box... just need to exit the app.
per @DSCaskey - checkRequiredMeasurements() throws an exception, but it should only return whether the measurements are valid. The exception should be thrown elsewhere. This workflow should be broken up into smaller, more fine grained functions(), but won't be handled right away.
When opening a pattern where the designated measurement file can't be found, the user can select another measurement file. If the selected measurement file doesn't contain all of the required measurements, the following error message is displayed. When the user clicks 'OK' the pattern closes.
This popup message could provide the user more error handling options.
These options could be:
Also, add the path and measurement file name in the error message for clarity.