summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-01-23 19:51:51 -0300
committerJuan Linietsky <reduzio@gmail.com>2016-01-23 19:51:51 -0300
commit6c27df8df609337867c108c5adb66174393e190b (patch)
tree11c1e8ad5f1f844fe6af2032784fd8e2a2951420 /tools
parenta2992d5955ff4f84f829dcab4859b4f5b5399a2c (diff)
-Fixes a bunch of stdout errors, closes #2763 closes #2731
Diffstat (limited to 'tools')
-rw-r--r--tools/editor/animation_editor.cpp4
-rw-r--r--tools/editor/connections_dialog.cpp7
-rw-r--r--tools/editor/editor_node.cpp8
-rw-r--r--tools/editor/plugins/animation_player_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/shader_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/sprite_region_editor_plugin.cpp2
-rw-r--r--tools/editor/property_editor.cpp4
-rw-r--r--tools/editor/scene_tree_editor.cpp3
-rw-r--r--tools/editor/script_editor_debugger.cpp4
9 files changed, 23 insertions, 13 deletions
diff --git a/tools/editor/animation_editor.cpp b/tools/editor/animation_editor.cpp
index fbe50d6d96..cdce910665 100644
--- a/tools/editor/animation_editor.cpp
+++ b/tools/editor/animation_editor.cpp
@@ -2814,6 +2814,8 @@ void AnimationKeyEditor::_notification(int p_what) {
case NOTIFICATION_ENTER_TREE: {
+ key_editor->edit(key_edit);
+
zoomicon->set_texture( get_icon("Zoom","EditorIcons") );
menu_add_track->set_icon(get_icon("AddTrack","EditorIcons"));
@@ -3924,7 +3926,7 @@ AnimationKeyEditor::AnimationKeyEditor() {
key_edit = memnew( AnimationKeyEdit );
key_edit->undo_redo=undo_redo;
//key_edit->ke_dialog=key_edit_dialog;
- key_editor->edit(key_edit);
+
type_menu = memnew( PopupMenu );
add_child(type_menu);
for(int i=0;i<Variant::VARIANT_MAX;i++)
diff --git a/tools/editor/connections_dialog.cpp b/tools/editor/connections_dialog.cpp
index e94bc78f5d..1e530b21c2 100644
--- a/tools/editor/connections_dialog.cpp
+++ b/tools/editor/connections_dialog.cpp
@@ -96,7 +96,11 @@ void ConnectDialog::_notification(int p_what) {
RID ci = get_canvas_item();
get_stylebox("panel","PopupMenu")->draw(ci,Rect2(Point2(),get_size()));
- }
+ }
+
+ if (p_what==NOTIFICATION_ENTER_TREE) {
+ bind_editor->edit(cdbinds);
+ }
}
void ConnectDialog::_tree_node_selected() {
@@ -456,7 +460,6 @@ ConnectDialog::ConnectDialog() {
set_as_toplevel(true);
cdbinds = memnew( ConnectDialogBinds );
- bind_editor->edit(cdbinds);
error = memnew( ConfirmationDialog );
add_child(error);
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp
index 8d5f5e8aca..9fe76a738a 100644
--- a/tools/editor/editor_node.cpp
+++ b/tools/editor/editor_node.cpp
@@ -4533,14 +4533,14 @@ void EditorNode::_scene_tab_changed(int p_tab) {
editor_data.get_undo_redo().create_action("Switch Scene Tab");
editor_data.get_undo_redo().add_do_method(this,"set_current_version",unsaved?saved_version:0);
editor_data.get_undo_redo().add_do_method(this,"set_current_scene",p_tab);
- editor_data.get_undo_redo().add_do_method(scene_tabs,"set_current_tab",p_tab);
- editor_data.get_undo_redo().add_do_method(scene_tabs,"ensure_tab_visible",p_tab);
+ //editor_data.get_undo_redo().add_do_method(scene_tabs,"set_current_tab",p_tab);
+ //editor_data.get_undo_redo().add_do_method(scene_tabs,"ensure_tab_visible",p_tab);
editor_data.get_undo_redo().add_do_method(this,"set_current_version",next_scene_version==0?editor_data.get_undo_redo().get_version()+1:next_scene_version);
editor_data.get_undo_redo().add_undo_method(this,"set_current_version",next_scene_version);
editor_data.get_undo_redo().add_undo_method(this,"set_current_scene",editor_data.get_edited_scene());
- editor_data.get_undo_redo().add_undo_method(scene_tabs,"set_current_tab",editor_data.get_edited_scene());
- editor_data.get_undo_redo().add_undo_method(scene_tabs,"ensure_tab_visible",p_tab,editor_data.get_edited_scene());
+ //editor_data.get_undo_redo().add_undo_method(scene_tabs,"set_current_tab",editor_data.get_edited_scene());
+ //editor_data.get_undo_redo().add_undo_method(scene_tabs,"ensure_tab_visible",p_tab,editor_data.get_edited_scene());
editor_data.get_undo_redo().add_undo_method(this,"set_current_version",saved_version);
editor_data.get_undo_redo().commit_action();
diff --git a/tools/editor/plugins/animation_player_editor_plugin.cpp b/tools/editor/plugins/animation_player_editor_plugin.cpp
index b56140b32d..43b4276d45 100644
--- a/tools/editor/plugins/animation_player_editor_plugin.cpp
+++ b/tools/editor/plugins/animation_player_editor_plugin.cpp
@@ -93,7 +93,7 @@ void AnimationPlayerEditor::_notification(int p_what) {
if (p_what==NOTIFICATION_ENTER_TREE) {
- editor->connect("hide_animation_player_editors",this,"_hide_anim_editors");
+// editor->connect("hide_animation_player_editors",this,"_hide_anim_editors");
add_anim->set_icon( get_icon("New","EditorIcons") );
rename_anim->set_icon( get_icon("Rename","EditorIcons") );
duplicate_anim->set_icon( get_icon("Duplicate","EditorIcons") );
diff --git a/tools/editor/plugins/shader_editor_plugin.cpp b/tools/editor/plugins/shader_editor_plugin.cpp
index 65b5365b50..18d8f5efc0 100644
--- a/tools/editor/plugins/shader_editor_plugin.cpp
+++ b/tools/editor/plugins/shader_editor_plugin.cpp
@@ -234,7 +234,7 @@ void ShaderEditor::_tab_changed(int p_which) {
ShaderTextEditor *shader_editor = tab_container->get_tab_control(p_which)->cast_to<ShaderTextEditor>();
- if (shader_editor)
+ if (shader_editor && is_inside_tree())
shader_editor->get_text_edit()->grab_focus();
ensure_select_current();
diff --git a/tools/editor/plugins/sprite_region_editor_plugin.cpp b/tools/editor/plugins/sprite_region_editor_plugin.cpp
index 725de19dd7..8dfa8a60a6 100644
--- a/tools/editor/plugins/sprite_region_editor_plugin.cpp
+++ b/tools/editor/plugins/sprite_region_editor_plugin.cpp
@@ -367,7 +367,7 @@ void SpriteRegionEditor::edit(Node *p_sprite)
{
if (p_sprite) {
node=p_sprite->cast_to<Sprite>();
- node->connect("exit_tree",this,"_node_removed",varray(),CONNECT_ONESHOT);
+ node->connect("exit_tree",this,"_node_removed",varray(p_sprite),CONNECT_ONESHOT);
} else {
if (node)
node->disconnect("exit_tree",this,"_node_removed");
diff --git a/tools/editor/property_editor.cpp b/tools/editor/property_editor.cpp
index e5dc2db021..4b1b93ea6e 100644
--- a/tools/editor/property_editor.cpp
+++ b/tools/editor/property_editor.cpp
@@ -3099,7 +3099,7 @@ void PropertyEditor::update_tree() {
int usage = d.has("usage")?int(int(d["usage"])&(PROPERTY_USAGE_STORE_IF_NONONE|PROPERTY_USAGE_STORE_IF_NONZERO)):0;
if (_get_instanced_node_original_property(p.name,vorig) || usage) {
Variant v = obj->get(p.name);
-
+
if (_is_property_different(v,vorig,usage)) {
//print_line("FOR "+String(p.name)+" RELOAD WITH: "+String(v)+"("+Variant::get_type_name(v.get_type())+")=="+String(vorig)+"("+Variant::get_type_name(vorig.get_type())+")");
@@ -3908,7 +3908,7 @@ SectionedPropertyEditor::SectionedPropertyEditor() {
right_vb->add_margin_child("Properties:",editor,true);
editor->get_scene_tree()->set_column_titles_visible(false);
- add_child(editor);
+
editor->hide_top_label();
diff --git a/tools/editor/scene_tree_editor.cpp b/tools/editor/scene_tree_editor.cpp
index ea7d760133..0260457c81 100644
--- a/tools/editor/scene_tree_editor.cpp
+++ b/tools/editor/scene_tree_editor.cpp
@@ -721,6 +721,9 @@ void SceneTreeEditor::_update_selection(TreeItem *item) {
NodePath np = item->get_metadata(0);
+ if (!has_node(np))
+ return;
+
Node *n=get_node(np);
if (!n)
diff --git a/tools/editor/script_editor_debugger.cpp b/tools/editor/script_editor_debugger.cpp
index 297f10a1c8..e727668c49 100644
--- a/tools/editor/script_editor_debugger.cpp
+++ b/tools/editor/script_editor_debugger.cpp
@@ -530,6 +530,8 @@ void ScriptEditorDebugger::_notification(int p_what) {
case NOTIFICATION_ENTER_TREE: {
+ inspector->edit(variables);
+
step->set_icon( get_icon("DebugStep","EditorIcons"));
next->set_icon( get_icon("DebugNext","EditorIcons"));
back->set_icon( get_icon("Back","EditorIcons"));
@@ -1308,7 +1310,7 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor){
pending_in_queue=0;
variables = memnew( ScriptEditorDebuggerVariables );
- inspector->edit(variables);
+
breaked=false;
tabs->add_child(dbg);