Skip to content

Commit d16fd46

Browse files
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
1 parent 0a5e65b commit d16fd46

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

editor/src/messages/tool/tool_messages/path_tool.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1575,6 +1575,10 @@ impl Fsm for PathToolFsmState {
15751575

15761576
shape_editor.set_selected_layers(target_layers);
15771577

1578+
let new_state = make_path_editable_is_allowed(&mut document.network_interface).is_some();
1579+
if tool_data.make_path_editable_is_allowed != new_state {
1580+
responses.add(MenuBarMessage::SendLayout);
1581+
}
15781582
responses.add(OverlaysMessage::Draw);
15791583
self
15801584
}
@@ -3125,8 +3129,14 @@ impl Fsm for PathToolFsmState {
31253129
colinear,
31263130
};
31273131

3132+
let old = tool_data.make_path_editable_is_allowed;
31283133
tool_data.make_path_editable_is_allowed = make_path_editable_is_allowed(&mut document.network_interface).is_some();
31293134
tool_data.update_selection_status(shape_editor, document);
3135+
3136+
if old != tool_data.make_path_editable_is_allowed {
3137+
responses.add(MenuBarMessage::SendLayout);
3138+
}
3139+
31303140
self
31313141
}
31323142
(_, PathToolMessage::ManipulatorMakeHandlesColinear) => {

0 commit comments

Comments
 (0)