Browse Source

Merge branch 'master' of https://github.com/godotengine/godot

Juan Linietsky 9 years ago
parent
commit
bb392bde16
2 changed files with 6 additions and 6 deletions
  1. 2 6
      scene/gui/rich_text_label.cpp
  2. 4 0
      tools/editor/editor_node.cpp

+ 2 - 6
scene/gui/rich_text_label.cpp

@@ -1504,7 +1504,6 @@ Error RichTextLabel::append_bbcode(const String& p_bbcode) {
 
 void RichTextLabel::scroll_to_line(int p_line) {
 
-	p_line -= 1;
 	ERR_FAIL_INDEX(p_line,lines.size());
 	_validate_line_caches();
 	vscroll->set_val(lines[p_line].height_accum_cache-lines[p_line].height_cache);
@@ -1572,11 +1571,8 @@ bool RichTextLabel::search(const String& p_string,bool p_from_selection) {
 
 				}
 
-				if (line > 1) {
-					line-=1;
-				}
-
-				scroll_to_line(line);
+				line-=2;
+				scroll_to_line(line<0?0:line);
 
 				return true;
 			}

+ 4 - 0
tools/editor/editor_node.cpp

@@ -1563,6 +1563,10 @@ void EditorNode::_edit_current() {
 		scene_tree_dock->set_selected(NULL);
 		property_editor->edit( NULL );
 		object_menu->set_disabled(true);
+
+		if (editor_plugin_over)
+			editor_plugin_over->make_visible(false);
+
 		return;
 	}