Fix a derivative causing NaNs in boolean ops (#934)

* Fix a derivative causing NaNs

* Better error messages around boolean ops

* Tweak error dialog wording

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
0HyperCube
2023-01-01 08:54:10 +00:00
committed by Keavon Chambers
parent bf39a1dbe0
commit 4f0843d2bc
4 changed files with 38 additions and 4 deletions

View File

@@ -14,11 +14,11 @@ pub enum DocumentError {
NotAnImage,
NotAnImaginate,
InvalidFile(String),
BooleanOperationError(BooleanOperationError),
}
// TODO: change how BooleanOperationErrors are handled
impl From<BooleanOperationError> for DocumentError {
fn from(err: BooleanOperationError) -> Self {
DocumentError::InvalidFile(format!("{:?}", err))
DocumentError::BooleanOperationError(err)
}
}