summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2014-09-21 01:43:42 -0300
committerJuan Linietsky <reduzio@gmail.com>2014-09-21 01:43:42 -0300
commit11a5ed508b1cbde61a4d9dd4f469e86e74667623 (patch)
treee4bc1926057d788aeeef3633930bb958eb976d3a /tools
parentc5b905fca82f1437486f2168270c5caa0b4bf104 (diff)
Fixed too many little issues, check the issues closed today.
Diffstat (limited to 'tools')
-rw-r--r--tools/editor/code_editor.cpp20
-rw-r--r--tools/editor/editor_path.cpp8
-rw-r--r--tools/editor/scene_tree_dock.cpp10
-rw-r--r--tools/editor/scene_tree_editor.cpp4
4 files changed, 37 insertions, 5 deletions
diff --git a/tools/editor/code_editor.cpp b/tools/editor/code_editor.cpp
index 281415e4b7..6de59f184a 100644
--- a/tools/editor/code_editor.cpp
+++ b/tools/editor/code_editor.cpp
@@ -246,14 +246,28 @@ bool FindReplaceDialog::_search() {
if (is_backwards())
flags|=TextEdit::SEARCH_BACKWARDS;
- int line,col;
- bool found = text_edit->search(text,flags,text_edit->cursor_get_line(),text_edit->cursor_get_column(),line,col);
+ int line=text_edit->cursor_get_line(),col=text_edit->cursor_get_column();
+
+ if (is_backwards()) {
+ col-=1;
+ if (col<0) {
+ line-=1;
+ if (line<0) {
+ line=text_edit->get_line_count()-1;
+ }
+ col=text_edit->get_line(line).length();
+ }
+ }
+ bool found = text_edit->search(text,flags,line,col,line,col);
if (found) {
// print_line("found");
text_edit->cursor_set_line(line);
- text_edit->cursor_set_column(col+text.length());
+ if (is_backwards())
+ text_edit->cursor_set_column(col);
+ else
+ text_edit->cursor_set_column(col+text.length());
text_edit->select(line,col,line,col+text.length());
set_error("");
return true;
diff --git a/tools/editor/editor_path.cpp b/tools/editor/editor_path.cpp
index 6c283d1f09..83ca04fcab 100644
--- a/tools/editor/editor_path.cpp
+++ b/tools/editor/editor_path.cpp
@@ -79,8 +79,14 @@ void EditorPath::_notification(int p_what) {
} else if (obj->cast_to<Node>()) {
name=obj->cast_to<Node>()->get_name();
- } else
+ } else if (obj->cast_to<Resource>() && obj->cast_to<Resource>()->get_name()!="") {
+ name=obj->cast_to<Resource>()->get_name();
+ } else {
name=obj->get_type();
+ }
+
+ set_tooltip(obj->get_type());
+
label_font->draw(ci,Point2i(ofs,(size.height-label_font->get_height())/2+label_font->get_ascent()),name,Color(1,1,1),left);
} else {
diff --git a/tools/editor/scene_tree_dock.cpp b/tools/editor/scene_tree_dock.cpp
index e7f4beb46e..87336b2f2e 100644
--- a/tools/editor/scene_tree_dock.cpp
+++ b/tools/editor/scene_tree_dock.cpp
@@ -484,6 +484,16 @@ Node *SceneTreeDock::_duplicate(Node *p_node, Map<Node*,Node*> &duplimap) {
}
+
+ List<Node::GroupInfo> group_info;
+ p_node->get_groups(&group_info);
+ for (List<Node::GroupInfo>::Element *E=group_info.front();E;E=E->next()) {
+
+ if (E->get().persistent)
+ node->add_to_group(E->get().name,true);
+ }
+
+
node->set_name(p_node->get_name());
duplimap[p_node]=node;
diff --git a/tools/editor/scene_tree_editor.cpp b/tools/editor/scene_tree_editor.cpp
index 59bc24487a..9b4ef6cef1 100644
--- a/tools/editor/scene_tree_editor.cpp
+++ b/tools/editor/scene_tree_editor.cpp
@@ -224,7 +224,9 @@ void SceneTreeEditor::_add_nodes(Node *p_node,TreeItem *p_parent) {
if (p_node!=get_scene_node() && p_node->get_filename()!="" && can_open_instance) {
item->add_button(0,get_icon("InstanceOptions","EditorIcons"),BUTTON_SUBSCENE);
- item->set_tooltip(0,"Instance: "+p_node->get_filename());
+ item->set_tooltip(0,"Instance: "+p_node->get_filename()+"\nType: "+p_node->get_type());
+ } else {
+ item->set_tooltip(0,String(p_node->get_name())+"\nType: "+p_node->get_type());
}
if (can_open_instance) {