mirror of
https://github.com/penpot/penpot.git
synced 2025-05-13 21:16:37 +02:00
🐛 Fix transform matrix being carried to non-children shapes
This commit is contained in:
parent
03acfc2b3c
commit
49b4eabe8b
3 changed files with 42 additions and 24 deletions
|
@ -49,7 +49,7 @@ pub unsafe extern "C" fn draw_all_shapes(zoom: f32, pan_x: f32, pan_y: f32) {
|
|||
scale(zoom, zoom);
|
||||
translate(pan_x, pan_y);
|
||||
|
||||
render::render_shape(state, Uuid::nil());
|
||||
render::render_shape_tree(state, Uuid::nil());
|
||||
|
||||
flush();
|
||||
}
|
||||
|
@ -143,16 +143,16 @@ pub extern "C" fn add_child_shape(a: u32, b: u32, c: u32, d: u32) {
|
|||
let state = unsafe { STATE.as_mut() }.expect("got an invalid state pointer");
|
||||
let id = uuid_from_u32_quartet(a, b, c, d);
|
||||
if let Some(shape) = state.current_shape.as_deref_mut() {
|
||||
shape.shapes.push(id);
|
||||
}
|
||||
shape.shapes.push(id);
|
||||
}
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn clear_child_shapes() {
|
||||
let state = unsafe { STATE.as_mut() }.expect("got an invalid state pointer");
|
||||
if let Some(shape) = state.current_shape.as_deref_mut() {
|
||||
shape.shapes.clear();
|
||||
}
|
||||
shape.shapes.clear();
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue