summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editor/progress_dialog.cpp3
-rw-r--r--modules/gridmap/grid_map.cpp17
-rw-r--r--scene/main/viewport.cpp7
3 files changed, 18 insertions, 9 deletions
diff --git a/editor/progress_dialog.cpp b/editor/progress_dialog.cpp
index 2c2e5a7c9b..e02925e377 100644
--- a/editor/progress_dialog.cpp
+++ b/editor/progress_dialog.cpp
@@ -188,6 +188,9 @@ void ProgressDialog::add_task(const String &p_task, const String &p_label, int p
cancel_hb->raise();
cancelled = false;
_popup();
+ if (p_can_cancel) {
+ cancel->grab_focus();
+ }
}
bool ProgressDialog::task_step(const String &p_task, const String &p_state, int p_step, bool p_force_redraw) {
diff --git a/modules/gridmap/grid_map.cpp b/modules/gridmap/grid_map.cpp
index 1860176f0c..060d9848ba 100644
--- a/modules/gridmap/grid_map.cpp
+++ b/modules/gridmap/grid_map.cpp
@@ -475,16 +475,17 @@ bool GridMap::_octant_update(const OctantKey &p_key) {
xform.basis.set_orthogonal_index(c.rot);
xform.set_origin(cellpos * cell_size + ofs);
xform.basis.scale(Vector3(cell_scale, cell_scale, cell_scale));
+ if (baked_meshes.size()) {
+ if (theme->get_item_mesh(c.item).is_valid()) {
+ if (!multimesh_items.has(c.item)) {
+ multimesh_items[c.item] = List<Pair<Transform, IndexKey> >();
+ }
- if (theme->get_item_mesh(c.item).is_valid()) {
- if (!multimesh_items.has(c.item)) {
- multimesh_items[c.item] = List<Pair<Transform, IndexKey> >();
+ Pair<Transform, IndexKey> p;
+ p.first = xform;
+ p.second = E->get();
+ multimesh_items[c.item].push_back(p);
}
-
- Pair<Transform, IndexKey> p;
- p.first = xform;
- p.second = E->get();
- multimesh_items[c.item].push_back(p);
}
Vector<MeshLibrary::ShapeData> shapes = theme->get_item_shapes(c.item);
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index f5d7043a40..ae855e803c 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -1659,6 +1659,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
//cancel event, sorry, modal exclusive EATS UP ALL
//alternative, you can't pop out a window the same frame it was made modal (fixes many issues)
get_tree()->set_input_as_handled();
+
return; // no one gets the event if exclusive NO ONE
}
@@ -2348,7 +2349,6 @@ void Viewport::_gui_control_grab_focus(Control *p_control) {
//no need for change
if (gui.key_focus && gui.key_focus == p_control)
return;
-
get_tree()->call_group_flags(SceneTree::GROUP_CALL_REALTIME, "_viewports", "_gui_remove_focus");
gui.key_focus = p_control;
p_control->notification(Control::NOTIFICATION_FOCUS_ENTER);
@@ -2370,6 +2370,11 @@ List<Control *>::Element *Viewport::_gui_show_modal(Control *p_control) {
else
p_control->_modal_set_prev_focus_owner(0);
+ if (gui.mouse_focus && !p_control->is_a_parent_of(gui.mouse_focus)) {
+ gui.mouse_focus->notification(Control::NOTIFICATION_MOUSE_EXIT);
+ gui.mouse_focus = NULL;
+ }
+
return gui.modal_stack.back();
}