mirror of
https://github.com/vladmandic/automatic
synced 2026-09-18 16:54:33 +02:00
Fix XYZ grid state leaks on invalid axis values
The always-on variant returned from its parse-error handler without resetting the module-level active flag, silently disabling the XYZ grid for every later generation until restart. The selectable variant likewise returned without ending the job state it had begun. https: //claude.ai/code/session_014QWKWgKvMevcuvfCnsYoT2 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -251,6 +251,7 @@ class XYZGridScript(scripts_manager.Script):
|
||||
except Exception as e:
|
||||
log.error(f"XYZ grid: invalid axis values {e}")
|
||||
errors.display(e, 'xyz')
|
||||
shared.state.end(jobid)
|
||||
return None
|
||||
|
||||
Image.MAX_IMAGE_PIXELS = None # disable check in Pillow and rely on check below to allow large custom image sizes
|
||||
|
||||
@@ -267,6 +267,7 @@ class XYZGridScript(scripts_manager.Script):
|
||||
except Exception as e:
|
||||
log.error(f"XYZ grid: invalid axis values {e}")
|
||||
errors.display(e, 'xyz')
|
||||
active = False
|
||||
return None
|
||||
|
||||
Image.MAX_IMAGE_PIXELS = None # disable check in Pillow and rely on check below to allow large custom image sizes
|
||||
|
||||
Reference in New Issue
Block a user