mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-23 08:38:11 +08:00
Make the Text tool delete empty text layers when clicking away wth LMB (#2192)
Fix additions of layers when using left click Fixes: https://discord.com/channels/731730685944922173/881073965047636018/1327376421034922045
This commit is contained in:
@@ -63,7 +63,7 @@ pub enum TextToolMessage {
|
||||
Interact,
|
||||
PointerMove { center: Key, lock_ratio: Key },
|
||||
PointerOutsideViewport { center: Key, lock_ratio: Key },
|
||||
TextChange { new_text: String, is_right_click: bool },
|
||||
TextChange { new_text: String, is_left_or_right_click: bool },
|
||||
UpdateBounds { new_text: String },
|
||||
UpdateOptions(TextOptionsUpdate),
|
||||
}
|
||||
@@ -577,10 +577,10 @@ impl Fsm for TextToolFsmState {
|
||||
responses.add(FrontendMessage::TriggerTextCommit);
|
||||
TextToolFsmState::Editing
|
||||
}
|
||||
(TextToolFsmState::Editing, TextToolMessage::TextChange { new_text, is_right_click }) => {
|
||||
(TextToolFsmState::Editing, TextToolMessage::TextChange { new_text, is_left_or_right_click }) => {
|
||||
tool_data.new_text = new_text;
|
||||
|
||||
if !is_right_click {
|
||||
if !is_left_or_right_click {
|
||||
tool_data.set_editing(false, font_cache, responses);
|
||||
|
||||
responses.add(NodeGraphMessage::SetInput {
|
||||
|
||||
Reference in New Issue
Block a user