Improve layer positioning in graph upon reordering; improve history system; add selection history (#1945)

* Improve layer positioning

* Collapse space when deleting

* Improve moving layers in layer panel

* Improved transactions

* Selection history

* Code review

* Select previous selection when aborting

* Fix crash and artboard select

* Add mouse forward/back button selection history bindings

Code review

* Menu buttons

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
adamgerhant
2024-09-01 02:34:18 -07:00
committed by GitHub
co-authored by Keavon Chambers
parent 432385343e
commit 9adc640f19
29 changed files with 806 additions and 443 deletions
+3 -3
View File
@@ -23,7 +23,7 @@ pub trait EditorTestUtils {
fn move_mouse(&mut self, x: f64, y: f64);
fn mousedown(&mut self, state: EditorMouseState);
fn mouseup(&mut self, state: EditorMouseState);
fn lmb_mousedown(&mut self, x: f64, y: f64);
fn left_mousedown(&mut self, x: f64, y: f64);
fn input(&mut self, message: InputPreprocessorMessage);
fn select_tool(&mut self, typ: ToolType);
fn select_primary_color(&mut self, color: Color);
@@ -63,7 +63,7 @@ impl EditorTestUtils for Editor {
fn drag_tool(&mut self, typ: ToolType, x1: f64, y1: f64, x2: f64, y2: f64) {
self.select_tool(typ);
self.move_mouse(x1, y1);
self.lmb_mousedown(x1, y1);
self.left_mousedown(x1, y1);
self.move_mouse(x2, y2);
self.mouseup(EditorMouseState {
editor_position: (x2, y2).into(),
@@ -91,7 +91,7 @@ impl EditorTestUtils for Editor {
self.handle_message(InputPreprocessorMessage::PointerUp { editor_mouse_state, modifier_keys });
}
fn lmb_mousedown(&mut self, x: f64, y: f64) {
fn left_mousedown(&mut self, x: f64, y: f64) {
self.mousedown(EditorMouseState {
editor_position: (x, y).into(),
mouse_keys: MouseKeys::LEFT,