diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_node.cpp | 14 | ||||
-rw-r--r-- | editor/editor_profiler.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/editor_preview_plugins.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/multimesh_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/particles_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/shader_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/shader_editor_plugin.h | 2 | ||||
-rw-r--r-- | editor/plugins/tile_set_editor_plugin.cpp | 8 | ||||
-rw-r--r-- | editor/scene_tree_dock.cpp | 4 |
9 files changed, 20 insertions, 18 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 9d3be1ab9e..1e9cb2f88d 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -4967,18 +4967,18 @@ void EditorNode::dim_editor(bool p_dimming) { static int dim_count = 0; bool dim_ui = EditorSettings::get_singleton()->get("interface/editor/dim_editor_on_dialog_popup"); if (p_dimming) { - if (dim_ui) { - if (dim_count == 0) { - _start_dimming(true); - } - dim_count++; + if (dim_ui && dim_count == 0) { + _start_dimming(true); } + dim_count++; } else { if (dim_count == 1) { _start_dimming(false); - dim_count = 0; - } else if (dim_ui && dim_count > 0) { + } + if (dim_count > 0) { dim_count--; + } else { + ERR_PRINT("Undimmed before dimming!"); } } } diff --git a/editor/editor_profiler.cpp b/editor/editor_profiler.cpp index 9cf36f162d..471742948f 100644 --- a/editor/editor_profiler.cpp +++ b/editor/editor_profiler.cpp @@ -340,7 +340,7 @@ void EditorProfiler::_update_plot() { } } - wr = PoolVector<uint8_t>::Write(); + wr.release(); Ref<Image> img; img.instance(); diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp index 285823d95a..d260b171a8 100644 --- a/editor/plugins/editor_preview_plugins.cpp +++ b/editor/plugins/editor_preview_plugins.cpp @@ -676,7 +676,7 @@ Ref<Texture> EditorAudioStreamPreviewPlugin::generate(const RES &p_from, const S } } - imgdata = PoolVector<uint8_t>::Write(); + imgdata.release(); //post_process_preview(img); Ref<ImageTexture> ptex = Ref<ImageTexture>(memnew(ImageTexture)); diff --git a/editor/plugins/multimesh_editor_plugin.cpp b/editor/plugins/multimesh_editor_plugin.cpp index cae705a697..d59efe49e7 100644 --- a/editor/plugins/multimesh_editor_plugin.cpp +++ b/editor/plugins/multimesh_editor_plugin.cpp @@ -144,7 +144,7 @@ void MultiMeshEditor::_populate() { } } - w = PoolVector<Face3>::Write(); + w.release(); PoolVector<Face3> faces = geometry; ERR_EXPLAIN(TTR("Parent has no solid faces to populate.")); diff --git a/editor/plugins/particles_editor_plugin.cpp b/editor/plugins/particles_editor_plugin.cpp index f05e7d65d3..75d31459e8 100644 --- a/editor/plugins/particles_editor_plugin.cpp +++ b/editor/plugins/particles_editor_plugin.cpp @@ -197,7 +197,7 @@ void ParticlesEditorBase::_node_selected(const NodePath &p_path) { } } - w = PoolVector<Face3>::Write(); + w.release(); emission_dialog->popup_centered(Size2(300, 130)); } diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp index 04d13f0027..994c542187 100644 --- a/editor/plugins/shader_editor_plugin.cpp +++ b/editor/plugins/shader_editor_plugin.cpp @@ -190,7 +190,7 @@ void ShaderTextEditor::_check_shader_mode() { } } -void ShaderTextEditor::_code_complete_script(const String &p_code, List<String> *r_options) { +void ShaderTextEditor::_code_complete_script(const String &p_code, List<ScriptCodeCompletionOption> *r_options) { _check_shader_mode(); diff --git a/editor/plugins/shader_editor_plugin.h b/editor/plugins/shader_editor_plugin.h index f01e39189f..8e55a1ad70 100644 --- a/editor/plugins/shader_editor_plugin.h +++ b/editor/plugins/shader_editor_plugin.h @@ -53,7 +53,7 @@ protected: static void _bind_methods(); virtual void _load_theme_settings(); - virtual void _code_complete_script(const String &p_code, List<String> *r_options); + virtual void _code_complete_script(const String &p_code, List<ScriptCodeCompletionOption> *r_options); public: virtual void _validate_script(); diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp index 35cfdf15be..2b59787f17 100644 --- a/editor/plugins/tile_set_editor_plugin.cpp +++ b/editor/plugins/tile_set_editor_plugin.cpp @@ -1491,7 +1491,7 @@ void TileSetEditor::_on_workspace_input(const Ref<InputEvent> &p_ie) { w[i] = current_shape[i] - shape_anchor; } - w = PoolVector<Vector2>::Write(); + w.release(); undo_redo->create_action(TTR("Edit Occlusion Polygon")); undo_redo->add_do_method(edited_occlusion_shape.ptr(), "set_polygon", polygon); @@ -1514,7 +1514,7 @@ void TileSetEditor::_on_workspace_input(const Ref<InputEvent> &p_ie) { indices.push_back(i); } - w = PoolVector<Vector2>::Write(); + w.release(); undo_redo->create_action(TTR("Edit Navigation Polygon")); undo_redo->add_do_method(edited_navigation_shape.ptr(), "set_vertices", polygon); @@ -2785,7 +2785,7 @@ void TileSetEditor::close_shape(const Vector2 &shape_anchor) { w[i] = current_shape[i] - shape_anchor; } - w = PoolVector<Vector2>::Write(); + w.release(); shape->set_polygon(polygon); undo_redo->create_action(TTR("Create Occlusion Polygon")); @@ -2813,7 +2813,7 @@ void TileSetEditor::close_shape(const Vector2 &shape_anchor) { indices.push_back(i); } - w = PoolVector<Vector2>::Write(); + w.release(); shape->set_vertices(polygon); shape->add_polygon(indices); diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index 5f62ed0702..935946bf24 100644 --- a/editor/scene_tree_dock.cpp +++ b/editor/scene_tree_dock.cpp @@ -569,7 +569,9 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { Node *dupsingle = NULL; List<Node *> editable_children; - for (List<Node *>::Element *E = selection.front(); E; E = E->next()) { + selection.sort_custom<Node::Comparator>(); + + for (List<Node *>::Element *E = selection.back(); E; E = E->prev()) { Node *node = E->get(); Node *parent = node->get_parent(); |