mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-12-23 10:11:54 +00:00
Fix disabled state of Layer > Make Path Editable menu action getting out of sync (#3497)
* fix : sync the make path editable option * fix : control the call with state * fix : fix the call * fix : redundancy * fix : fmt
This commit is contained in:
parent
0a5e65bc9d
commit
d16fd46399
1 changed files with 10 additions and 0 deletions
|
|
@ -1575,6 +1575,10 @@ impl Fsm for PathToolFsmState {
|
|||
|
||||
shape_editor.set_selected_layers(target_layers);
|
||||
|
||||
let new_state = make_path_editable_is_allowed(&mut document.network_interface).is_some();
|
||||
if tool_data.make_path_editable_is_allowed != new_state {
|
||||
responses.add(MenuBarMessage::SendLayout);
|
||||
}
|
||||
responses.add(OverlaysMessage::Draw);
|
||||
self
|
||||
}
|
||||
|
|
@ -3125,8 +3129,14 @@ impl Fsm for PathToolFsmState {
|
|||
colinear,
|
||||
};
|
||||
|
||||
let old = tool_data.make_path_editable_is_allowed;
|
||||
tool_data.make_path_editable_is_allowed = make_path_editable_is_allowed(&mut document.network_interface).is_some();
|
||||
tool_data.update_selection_status(shape_editor, document);
|
||||
|
||||
if old != tool_data.make_path_editable_is_allowed {
|
||||
responses.add(MenuBarMessage::SendLayout);
|
||||
}
|
||||
|
||||
self
|
||||
}
|
||||
(_, PathToolMessage::ManipulatorMakeHandlesColinear) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue