Skip to content

Update UI when deleting last point of shape with Path tool#979

Merged
Keavon merged 9 commits into
masterfrom
unknown repository
Jan 28, 2023
Merged

Update UI when deleting last point of shape with Path tool#979
Keavon merged 9 commits into
masterfrom
unknown repository

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Jan 19, 2023

The Operation::DeleteSelectedManipulatorPoints re-routes the deletion logic to Operation::DeleteLayer when you delete the last point in a shape, which updates the Layer Tree structure in the frontend. After it's done deleting it emits a new DocumentResponse, DeletedSelectedManipulatorPoints, and when handled by process_message() in document_message_handler.rs, clears the Properties panel.

…e by delegating deletion to Operation::DeleteLayer. Also emits Operation::DeletedSelectedManipulatorPoints to let editor clear Properties panel
…lectedManipulatorPoints match case. When this DocumentResponse is emitted, it clears the Properties panel.
…tedManipulatorPoints. Updated imports in document_message_handler.rs to get the correct types for messages emitted from DocumentResponse::DeletedSelectedManipulatorPoints match case in process_message().
Copy link
Copy Markdown
Contributor

@0HyperCube 0HyperCube left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution, the code looks good.

Comment thread editor/src/messages/portfolio/document/document_message_handler.rs Outdated
graylime and others added 2 commits January 28, 2023 17:29
@Keavon Keavon changed the title Update Properties + Layer Tree panels when deleting with Path tool Update UI when deleting last point of shape with Path tool Jan 28, 2023
@Keavon Keavon merged commit e53dcd0 into GraphiteEditor:master Jan 28, 2023
Keavon added a commit that referenced this pull request Feb 8, 2023
* Added new DocumentResponse variant

* Update Operation::DeleteSelectedManipulatorPoints to update Layer Tree by delegating deletion to Operation::DeleteLayer. Also emits Operation::DeletedSelectedManipulatorPoints to let editor clear Properties panel

* Update process_message() to deal with new DocumentResponse::DeletedSelectedManipulatorPoints match case. When this DocumentResponse is emitted, it clears the Properties panel.

* Added Display trait implementation for DocumentResponse::DeletedSelectedManipulatorPoints. Updated imports in document_message_handler.rs to get the correct types for messages emitted from DocumentResponse::DeletedSelectedManipulatorPoints match case in process_message().

* Removed useless import. Capitalized comments for style consistency.

* Updated messages emitted to clear Properties panel by emitting LayoutMessage::SendLayout's instead, which update the backend widget state

* Revert inclusion of unused imports

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
Keavon added a commit that referenced this pull request Jul 30, 2023
* Added new DocumentResponse variant

* Update Operation::DeleteSelectedManipulatorPoints to update Layer Tree by delegating deletion to Operation::DeleteLayer. Also emits Operation::DeletedSelectedManipulatorPoints to let editor clear Properties panel

* Update process_message() to deal with new DocumentResponse::DeletedSelectedManipulatorPoints match case. When this DocumentResponse is emitted, it clears the Properties panel.

* Added Display trait implementation for DocumentResponse::DeletedSelectedManipulatorPoints. Updated imports in document_message_handler.rs to get the correct types for messages emitted from DocumentResponse::DeletedSelectedManipulatorPoints match case in process_message().

* Removed useless import. Capitalized comments for style consistency.

* Updated messages emitted to clear Properties panel by emitting LayoutMessage::SendLayout's instead, which update the backend widget state

* Revert inclusion of unused imports

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants