summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/editor/property_editor.cpp15
-rw-r--r--tools/editor/scene_tree_dock.cpp5
2 files changed, 16 insertions, 4 deletions
diff --git a/tools/editor/property_editor.cpp b/tools/editor/property_editor.cpp
index 7687791ca2..31393ebcbc 100644
--- a/tools/editor/property_editor.cpp
+++ b/tools/editor/property_editor.cpp
@@ -2433,10 +2433,19 @@ void PropertyEditor::update_tree() {
if (capitalize_paths)
name = name.camelcase_to_underscore().capitalize();
- if (use_filter && filter!="" && name.findn(filter)==-1)
- continue;
-
String path=p.name.left( p.name.find_last("/") ) ;
+
+ if (use_filter && filter!="") {
+
+ String cat = path;
+
+ if (capitalize_paths)
+ cat = cat.capitalize();
+
+ if (cat.findn(filter)==-1 && name.findn(filter)==-1)
+ continue;
+ }
+
//printf("property %s\n",p.name.ascii().get_data());
TreeItem * parent = get_parent_node(path,item_path,current_category?current_category:root );
//if (parent->get_parent()==root)
diff --git a/tools/editor/scene_tree_dock.cpp b/tools/editor/scene_tree_dock.cpp
index 0cafe7459b..8b5bf8c1e1 100644
--- a/tools/editor/scene_tree_dock.cpp
+++ b/tools/editor/scene_tree_dock.cpp
@@ -1264,7 +1264,10 @@ void SceneTreeDock::import_subscene() {
void SceneTreeDock::_import_subscene() {
Node* parent = scene_tree->get_selected();
- ERR_FAIL_COND(!parent);
+ if (!parent) {
+ parent = editor_data->get_edited_scene_root();
+ ERR_FAIL_COND(!parent);
+ }
import_subscene_dialog->move(parent,edited_scene);
editor_data->get_undo_redo().clear_history(); //no undo for now..