aboutsummaryrefslogtreecommitdiff
path: root/tools/editor/editor_node.cpp
diff options
context:
space:
mode:
authorHubert Jarosz2016-03-09 00:00:52 +0100
committerRémi Verschelde2016-04-02 22:03:48 +0200
commit424a1046664eb1dc8138ccb886ba1c1967c3caa4 (patch)
tree650074feb39a8237875bfa0ef0ea842e8d96f41c /tools/editor/editor_node.cpp
parent830947feafc5e3af452296ff80a6418e9c56c5d2 (diff)
downloadgodot-424a1046664eb1dc8138ccb886ba1c1967c3caa4.tar.gz
godot-424a1046664eb1dc8138ccb886ba1c1967c3caa4.tar.zst
godot-424a1046664eb1dc8138ccb886ba1c1967c3caa4.zip
remove trailing whitespace
(cherry picked from commit 4a4f2479146aa33e235ed57cde311efda68d3c8f)
Diffstat (limited to 'tools/editor/editor_node.cpp')
-rw-r--r--tools/editor/editor_node.cpp112
1 files changed, 56 insertions, 56 deletions
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp
index 789dee4db..69f5e170f 100644
--- a/tools/editor/editor_node.cpp
+++ b/tools/editor/editor_node.cpp
@@ -204,8 +204,8 @@ void EditorNode::_notification(int p_what) {
log->deinit(); // do not get messages anymore
}
if (p_what==NOTIFICATION_PROCESS) {
-
- //force the whole tree viewport
+
+ //force the whole tree viewport
#if 0
{
Rect2 grect = scene_root_base->get_global_rect();
@@ -274,13 +274,13 @@ void EditorNode::_notification(int p_what) {
}
}
-
+
}
if (p_what==NOTIFICATION_ENTER_TREE) {
//MessageQueue::get_singleton()->push_call(this,"_get_scene_metadata");
- get_tree()->set_editor_hint(true);
+ get_tree()->set_editor_hint(true);
get_tree()->get_root()->set_as_audio_listener(false);
get_tree()->get_root()->set_as_audio_listener_2d(false);
get_tree()->set_auto_accept_quit(false);
@@ -568,12 +568,12 @@ void EditorNode::save_resource_as(const Ref<Resource>& p_resource) {
void EditorNode::_menu_option(int p_option) {
-
+
_menu_option_confirm(p_option,false);
}
void EditorNode::_menu_confirm_current() {
-
+
_menu_option_confirm(current_option,true);
}
@@ -582,27 +582,27 @@ void EditorNode::_dialog_display_file_error(String p_file,Error p_error) {
if (p_error) {
-
+
current_option=-1;
//accept->"()->hide();
accept->get_ok()->set_text("I see..");
-
+
switch(p_error) {
-
+
case ERR_FILE_CANT_WRITE: {
accept->set_text("Can't open file for writing: "+p_file.extension());
} break;
case ERR_FILE_UNRECOGNIZED: {
-
+
accept->set_text("File format requested unknown: "+p_file.extension());
} break;
default: {
-
+
accept->set_text("Error Saving.");
}break;
}
-
+
accept->popup_centered_minsize();
}
@@ -1143,10 +1143,10 @@ void EditorNode::_import(const String &p_file) {
}
void EditorNode::_dialog_action(String p_file) {
-
+
switch(current_option) {
-
+
case RESOURCE_LOAD: {
RES res = ResourceLoader::load(p_file);
@@ -1161,7 +1161,7 @@ void EditorNode::_dialog_action(String p_file) {
push_item(res.operator->() );
- } break;
+ } break;
case FILE_NEW_INHERITED_SCENE: {
@@ -1447,13 +1447,13 @@ void EditorNode::_dialog_action(String p_file) {
} break;
default: { //save scene?
-
+
if (file->get_mode()==FileDialog::MODE_SAVE_FILE) {
//_save_scene(p_file);
_save_scene_with_preview(p_file);
}
-
+
} break;
}
}
@@ -1547,13 +1547,13 @@ void EditorNode::_property_editor_forward() {
if (editor_history.next())
_edit_current();
-
+
}
void EditorNode::_property_editor_back() {
-
+
if (editor_history.previous())
_edit_current();
-
+
}
@@ -1583,7 +1583,7 @@ void EditorNode::_hide_top_editors() {
}
void EditorNode::_edit_current() {
-
+
uint32_t current = editor_history.get_current();
Object *current_obj = current>0 ? ObjectDB::get_instance(current) : NULL;
@@ -1595,7 +1595,7 @@ void EditorNode::_edit_current() {
if (!current_obj) {
-
+
scene_tree_dock->set_selected(NULL);
property_editor->edit( NULL );
object_menu->set_disabled(true);
@@ -1769,7 +1769,7 @@ void EditorNode::_resource_created() {
}
void EditorNode::_resource_selected(const RES& p_res,const String& p_property) {
-
+
if (p_res.is_null())
return;
@@ -1962,13 +1962,13 @@ void EditorNode::_cleanup_scene() {
}
}
-
+
_update_title();
#endif
}
void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
-
+
//print_line("option "+itos(p_option)+" confirm "+itos(p_confirmed));
if (!p_confirmed) //this may be a hack..
current_option=(MenuOptions)p_option;
@@ -1993,12 +1993,12 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
//_cleanup_scene();
-
+
} break;
case FILE_NEW_INHERITED_SCENE:
case FILE_OPEN_SCENE: {
-
-
+
+
//print_tree();
file->set_mode(EditorFileDialog::MODE_OPEN_FILE);
//not for now?
@@ -2006,10 +2006,10 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
ResourceLoader::get_recognized_extensions_for_type("PackedScene",&extensions);
file->clear_filters();
for(int i=0;i<extensions.size();i++) {
-
+
file->add_filter("*."+extensions[i]+" ; "+extensions[i].to_upper());
}
-
+
//file->set_current_path(current_path);
Node *scene = editor_data.get_edited_scene_root();
@@ -2018,7 +2018,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
};
file->set_title(p_option==FILE_OPEN_SCENE?"Open Scene":"Open Base Scene");
file->popup_centered_ratio();
-
+
} break;
case FILE_QUICK_OPEN_SCENE: {
@@ -2085,19 +2085,19 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
// fallthrough to save_as
};
case FILE_SAVE_AS_SCENE: {
-
+
Node *scene = editor_data.get_edited_scene_root();
-
+
if (!scene) {
-
+
current_option=-1;
//confirmation->get_cancel()->hide();
accept->get_ok()->set_text("I see..");
accept->set_text("This operation can't be done without a tree root.");
accept->popup_centered_minsize();
- break;
+ break;
}
-
+
file->set_mode(EditorFileDialog::MODE_SAVE_FILE);
bool relpaths = (scene->has_meta("__editor_relpaths__") && scene->get_meta("__editor_relpaths__").operator bool());
@@ -2110,7 +2110,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
file->add_filter("*."+extensions[i]+" ; "+extensions[i].to_upper());
}
-
+
//file->set_current_path(current_path);
if (scene->get_filename()!="") {
file->set_current_path(scene->get_filename());
@@ -2131,7 +2131,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
}
file->popup_centered_ratio();
file->set_title("Save Scene As..");
-
+
} break;
case FILE_SAVE_BEFORE_RUN: {
@@ -2311,7 +2311,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
} break;
case FILE_QUIT: {
-
+
if (!p_confirmed) {
@@ -2325,7 +2325,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
_menu_option_confirm(RUN_STOP,true);
get_tree()->quit();
-
+
} break;
case FILE_EXTERNAL_OPEN_SCENE: {
@@ -2534,13 +2534,13 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
} break;
case OBJECT_COPY_PARAMS: {
-
+
editor_data.apply_changes_in_editors();;
if (current)
editor_data.copy_object_params(current);
} break;
case OBJECT_PASTE_PARAMS: {
-
+
editor_data.apply_changes_in_editors();;
if (current)
editor_data.paste_object_params(current);
@@ -2588,7 +2588,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
} break;
case OBJECT_CALL_METHOD: {
-
+
editor_data.apply_changes_in_editors();;
call_dialog->set_object(current);
call_dialog->popup_centered_ratio();
@@ -2833,7 +2833,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
} break;
default: {
-
+
if (p_option>=OBJECT_METHOD_BASE) {
ERR_FAIL_COND(!current);
@@ -2857,12 +2857,12 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
}
}
- }
+ }
}
Control* EditorNode::get_viewport() {
-
+
return viewport;
}
@@ -2907,7 +2907,7 @@ void EditorNode::add_editor_plugin(EditorPlugin *p_editor) {
if (p_editor->has_main_screen()) {
-
+
ToolButton *tb = memnew( ToolButton );
tb->set_toggle_mode(true);
tb->connect("pressed",singleton,"_editor_select",varray(singleton->main_editor_buttons.size()));
@@ -3002,9 +3002,9 @@ void EditorNode::set_edited_scene(Node *p_scene) {
if (get_editor_data().get_edited_scene_root()->get_parent()==scene_root)
scene_root->remove_child(get_editor_data().get_edited_scene_root());
- }
+ }
get_editor_data().set_edited_scene_root(p_scene);
-
+
if (p_scene && p_scene->cast_to<Popup>())
p_scene->cast_to<Popup>()->show(); //show popups
scene_tree_dock->set_edited_scene(p_scene);
@@ -3573,7 +3573,7 @@ Error EditorNode::load_scene(const String& p_scene, bool p_ignore_broken_deps,bo
if (p_set_inherited) {
Ref<SceneState> state = sdata->get_state();
- state->set_path(lpath);
+ state->set_path(lpath);
new_scene->set_scene_inherited_state(state);
new_scene->set_filename(String());
//if (new_scene->get_scene_instance_state().is_valid())
@@ -3710,7 +3710,7 @@ void EditorNode::animation_editor_make_visible(bool p_visible) {
if (p_visible) {
- animation_editor->show();
+ animation_editor->show();
animation_vb->get_parent_control()->minimum_size_changed();
//pd_anim->show();
top_split->set_collapsed(false);
@@ -4128,7 +4128,7 @@ void EditorNode::_dock_popup_exit() {
}
void EditorNode::_dock_pre_popup(int p_which) {
-
+
dock_popup_selected=p_which;
}
@@ -5674,7 +5674,7 @@ EditorNode::EditorNode() {
-
+
call_dialog = memnew( CallDialog );
call_dialog->hide();
gui_base->add_child( call_dialog );
@@ -5727,7 +5727,7 @@ EditorNode::EditorNode() {
dependency_fixer = memnew( DependencyEditor );
gui_base->add_child( dependency_fixer );
-
+
settings_config_dialog = memnew( EditorSettingsDialog );
gui_base->add_child(settings_config_dialog);
@@ -5837,7 +5837,7 @@ EditorNode::EditorNode() {
property_forward->connect("pressed", this,"_property_editor_forward");
property_back->connect("pressed", this,"_property_editor_back");
-
+
file_menu->get_popup()->connect("item_pressed", this,"_menu_option");
@@ -6060,7 +6060,7 @@ EditorNode::EditorNode() {
}
-EditorNode::~EditorNode() {
+EditorNode::~EditorNode() {
memdelete( EditorHelp::get_doc_data() );