mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-27 01:38:11 +08:00
Refactor ViewportPosition from u32 (UVec2) to f64 (DVec2) (#345)
* Refactor ViewportPosition from u32 (UVec2) to f64 (DVec2) * Fix pseudo_hash call * Replace hash function with proper function for uuid generation * Cargo fmt Co-authored-by: Dennis Kobert <dennis@kobert.dev>
This commit is contained in:
co-authored by
Dennis Kobert
parent
91543d530d
commit
790647815b
@@ -65,7 +65,7 @@ impl Fsm for PenToolFsmState {
|
||||
responses: &mut VecDeque<Message>,
|
||||
) -> Self {
|
||||
let transform = document.document.root.transform;
|
||||
let pos = transform.inverse() * DAffine2::from_translation(input.mouse.position.as_f64());
|
||||
let pos = transform.inverse() * DAffine2::from_translation(input.mouse.position);
|
||||
|
||||
use PenMessage::*;
|
||||
use PenToolFsmState::*;
|
||||
@@ -74,7 +74,7 @@ impl Fsm for PenToolFsmState {
|
||||
(Ready, DragStart) => {
|
||||
responses.push_back(DocumentMessage::StartTransaction.into());
|
||||
responses.push_back(DocumentMessage::DeselectAllLayers.into());
|
||||
data.path = Some(vec![generate_hash(&*responses, input, document.document.hash())]);
|
||||
data.path = Some(vec![generate_uuid()]);
|
||||
|
||||
data.points.push(pos);
|
||||
data.next_point = pos;
|
||||
|
||||
Reference in New Issue
Block a user