mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-15 22:28:10 +08:00
Fix the Imaginate node from crashing (#1512)
* Allow generic node input for type inference * Make imaginate resolution picking depend on the image resolution instead of the transform * Remove dead code * Fix console spam after crash * Fix crash when disconnecting Imaginate node input * Update Imaginate tool tooltip --------- Co-authored-by: Dennis Kobert <dennis@kobert.dev>
This commit is contained in:
@@ -21,6 +21,10 @@ pub struct ClickTarget {
|
||||
impl ClickTarget {
|
||||
/// Does the click target intersect the rectangle
|
||||
pub fn intersect_rectangle(&self, document_quad: Quad, layer_transform: DAffine2) -> bool {
|
||||
// Check if the matrix is not invertible
|
||||
if layer_transform.matrix2.determinant() <= std::f64::EPSILON {
|
||||
return false;
|
||||
}
|
||||
let quad = layer_transform.inverse() * document_quad;
|
||||
|
||||
// Check if outlines intersect
|
||||
|
||||
@@ -45,7 +45,7 @@ impl<T, CachedNode> MemoNode<T, CachedNode> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct IORecord<I, O> {
|
||||
pub input: I,
|
||||
pub output: O,
|
||||
|
||||
Reference in New Issue
Block a user