mirror of
https://github.com/godotengine/godot.git
synced 2024-11-14 16:13:08 +00:00
Remove ghost of canvas zoom controls during onion skinning
This commit is contained in:
parent
4dd9efe757
commit
3b17e6de33
@ -1431,6 +1431,7 @@ void AnimationPlayerEditor::_prepare_onion_layers_2() {
|
||||
new_state["show_rulers"] = false;
|
||||
new_state["show_guides"] = false;
|
||||
new_state["show_helpers"] = false;
|
||||
new_state["show_zoom_control"] = false;
|
||||
// TODO: Save/restore only affected entries
|
||||
CanvasItemEditor::get_singleton()->set_state(new_state);
|
||||
}
|
||||
|
@ -4515,6 +4515,7 @@ Dictionary CanvasItemEditor::get_state() const {
|
||||
state["show_rulers"] = show_rulers;
|
||||
state["show_guides"] = show_guides;
|
||||
state["show_helpers"] = show_helpers;
|
||||
state["show_zoom_control"] = zoom_hb->is_visible();
|
||||
state["show_edit_locks"] = show_edit_locks;
|
||||
state["snap_rotation"] = snap_rotation;
|
||||
state["snap_relative"] = snap_relative;
|
||||
@ -4643,6 +4644,11 @@ void CanvasItemEditor::set_state(const Dictionary &p_state) {
|
||||
view_menu->get_popup()->set_item_checked(idx, show_edit_locks);
|
||||
}
|
||||
|
||||
if (state.has("show_zoom_control")) {
|
||||
// This one is not user-controllable, but instrumentable
|
||||
zoom_hb->set_visible(state["show_zoom_control"]);
|
||||
}
|
||||
|
||||
if (state.has("snap_rotation")) {
|
||||
snap_rotation = state["snap_rotation"];
|
||||
int idx = snap_config_menu->get_popup()->get_item_index(SNAP_USE_ROTATION);
|
||||
|
Loading…
Reference in New Issue
Block a user