summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorJylhis <markus@jylhis.com>2017-04-14 14:49:50 +0300
committerJylhis <markus@jylhis.com>2017-04-14 15:01:56 +0300
commitaa63fd1551fd99d5936999ad0607f48755dc2963 (patch)
tree5d09c23ce266b22e9f958c7b4ea1a50d4b81340f /editor
parent8ccb9d13c31e3dc2a7bad00edb3676e45f16b05e (diff)
Fix #7262
Disable PopupMenu hiding in snap settings of the TextureRegion editor and Edit menu of the scene
Diffstat (limited to 'editor')
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp2
-rw-r--r--editor/plugins/texture_region_editor_plugin.cpp1
2 files changed, 3 insertions, 0 deletions
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 1a533dce32..08e09dd629 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -3241,6 +3241,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
PopupMenu *p;
p = edit_menu->get_popup();
+ p->set_hide_on_checkable_item_selection(false);
p->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/use_snap", TTR("Use Snap")), SNAP_USE);
p->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/show_grid", TTR("Show Grid")), SNAP_SHOW_GRID);
p->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/use_rotation_snap", TTR("Use Rotation Snap")), SNAP_USE_ROTATION);
@@ -3262,6 +3263,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
skeleton_menu->add_separator();
skeleton_menu->add_shortcut(ED_SHORTCUT("canvas_item_editor/skeleton_set_ik_chain", TTR("Make IK Chain")), SKELETON_SET_IK_CHAIN);
skeleton_menu->add_shortcut(ED_SHORTCUT("canvas_item_editor/skeleton_clear_ik_chain", TTR("Clear IK Chain")), SKELETON_CLEAR_IK_CHAIN);
+ skeleton_menu->set_hide_on_checkable_item_selection(false);
skeleton_menu->connect("id_pressed", this, "_popup_callback");
/*
diff --git a/editor/plugins/texture_region_editor_plugin.cpp b/editor/plugins/texture_region_editor_plugin.cpp
index 4c49b467d8..fe93a5aac6 100644
--- a/editor/plugins/texture_region_editor_plugin.cpp
+++ b/editor/plugins/texture_region_editor_plugin.cpp
@@ -790,6 +790,7 @@ TextureRegionEditor::TextureRegionEditor(EditorNode *p_editor) {
hb_tools->add_child(snap_mode_button);
snap_mode_button->set_text(TTR("<None>"));
PopupMenu *p = snap_mode_button->get_popup();
+ p->set_hide_on_checkable_item_selection(false);
p->add_item(TTR("<None>"), 0);
p->add_item(TTR("Pixel Snap"), 1);
p->add_item(TTR("Grid Snap"), 2);