summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-05-03 22:32:38 -0300
committerJuan Linietsky <reduzio@gmail.com>2016-05-03 22:32:38 -0300
commitdd69aeceac3d1798d0869d8adfb44af883b5fb93 (patch)
tree717e9b909ada0661940f6f3d2bd5349c6424bbf1 /tools
parent567cb691ec49844101247bb9dc34bc2722f6af4f (diff)
parentb81d9e6d614a67fd58e2256e90055589205bfa30 (diff)
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'tools')
-rw-r--r--tools/doc/doc_data.cpp20
-rw-r--r--tools/editor/editor_node.cpp7
2 files changed, 26 insertions, 1 deletions
diff --git a/tools/doc/doc_data.cpp b/tools/doc/doc_data.cpp
index 2d0d7617c2..4232a6480d 100644
--- a/tools/doc/doc_data.cpp
+++ b/tools/doc/doc_data.cpp
@@ -61,6 +61,26 @@ void DocData::merge_from(const DocData& p_data) {
continue;
if (cf.methods[j].arguments.size()!=m.arguments.size())
continue;
+ // since polymorphic functions are allowed we need to check the type of
+ // the arguments so we make sure they are different.
+ int arg_count = cf.methods[j].arguments.size();
+ bool arg_used[arg_count];
+ for (int l = 0; l < arg_count; ++l) arg_used[l] = false;
+ // also there is no guarantee that argument ordering will match, so we
+ // have to check one by one so we make sure we have an exact match
+ for (int k = 0; k < arg_count; ++k) {
+ for (int l = 0; l < arg_count; ++l)
+ if (cf.methods[j].arguments[k].type == m.arguments[l].type && !arg_used[l]) {
+ arg_used[l] = true;
+ break;
+ }
+ }
+ bool not_the_same = false;
+ for (int l = 0; l < arg_count; ++l)
+ if (!arg_used[l]) // at least one of the arguments was different
+ not_the_same = true;
+ if (not_the_same)
+ continue;
const MethodDoc &mf = cf.methods[j];
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp
index 691269a220..e7ace943ae 100644
--- a/tools/editor/editor_node.cpp
+++ b/tools/editor/editor_node.cpp
@@ -4668,8 +4668,13 @@ void EditorNode::_scene_tab_script_edited(int p_tab) {
void EditorNode::_scene_tab_closed(int p_tab) {
current_option = SCENE_TAB_CLOSE;
tab_closing = p_tab;
- if (unsaved_cache) {
+
+ bool unsaved = (p_tab==editor_data.get_edited_scene()) ?
+ saved_version!=editor_data.get_undo_redo().get_version() :
+ editor_data.get_scene_version(p_tab)!=0;
+ if (unsaved) {
confirmation->get_ok()->set_text(TTR("Yes"));
+
//confirmation->get_cancel()->show();
confirmation->set_text(TTR("Close scene? (Unsaved changes will be lost)"));
confirmation->popup_centered_minsize();