Remove ghost of canvas zoom controls during onion skinning
(cherry picked from commit 3b17e6de33
)
This commit is contained in:
parent
f040f7c283
commit
340f542e49
|
@ -1430,6 +1430,7 @@ void AnimationPlayerEditor::_prepare_onion_layers_2() {
|
||||||
new_state["show_rulers"] = false;
|
new_state["show_rulers"] = false;
|
||||||
new_state["show_guides"] = false;
|
new_state["show_guides"] = false;
|
||||||
new_state["show_helpers"] = false;
|
new_state["show_helpers"] = false;
|
||||||
|
new_state["show_zoom_control"] = false;
|
||||||
// TODO: Save/restore only affected entries
|
// TODO: Save/restore only affected entries
|
||||||
CanvasItemEditor::get_singleton()->set_state(new_state);
|
CanvasItemEditor::get_singleton()->set_state(new_state);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4372,6 +4372,7 @@ Dictionary CanvasItemEditor::get_state() const {
|
||||||
state["show_rulers"] = show_rulers;
|
state["show_rulers"] = show_rulers;
|
||||||
state["show_guides"] = show_guides;
|
state["show_guides"] = show_guides;
|
||||||
state["show_helpers"] = show_helpers;
|
state["show_helpers"] = show_helpers;
|
||||||
|
state["show_zoom_control"] = zoom_hb->is_visible();
|
||||||
state["show_edit_locks"] = show_edit_locks;
|
state["show_edit_locks"] = show_edit_locks;
|
||||||
state["snap_rotation"] = snap_rotation;
|
state["snap_rotation"] = snap_rotation;
|
||||||
state["snap_relative"] = snap_relative;
|
state["snap_relative"] = snap_relative;
|
||||||
|
@ -4500,6 +4501,11 @@ void CanvasItemEditor::set_state(const Dictionary &p_state) {
|
||||||
view_menu->get_popup()->set_item_checked(idx, show_edit_locks);
|
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")) {
|
if (state.has("snap_rotation")) {
|
||||||
snap_rotation = state["snap_rotation"];
|
snap_rotation = state["snap_rotation"];
|
||||||
int idx = snap_config_menu->get_popup()->get_item_index(SNAP_USE_ROTATION);
|
int idx = snap_config_menu->get_popup()->get_item_index(SNAP_USE_ROTATION);
|
||||||
|
|
Loading…
Reference in New Issue