summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editor/editor_autoload_settings.cpp8
-rw-r--r--editor/editor_feature_profile.cpp8
-rw-r--r--editor/editor_file_system.cpp7
-rw-r--r--editor/editor_inspector.cpp8
-rw-r--r--editor/editor_node.cpp4
-rw-r--r--platform/ios/app_delegate.mm9
-rw-r--r--platform/ios/godot_ios.mm8
-rw-r--r--platform/ios/os_ios.h5
-rw-r--r--platform/ios/os_ios.mm32
9 files changed, 42 insertions, 47 deletions
diff --git a/editor/editor_autoload_settings.cpp b/editor/editor_autoload_settings.cpp
index 8cb1dfd24e..41b3d45a1f 100644
--- a/editor/editor_autoload_settings.cpp
+++ b/editor/editor_autoload_settings.cpp
@@ -541,8 +541,6 @@ void EditorAutoloadSettings::update_autoload() {
info.node->queue_free();
info.node = nullptr;
}
-
- ProjectSettings::get_singleton()->remove_autoload(info.name);
}
// Load new/changed autoloads
@@ -567,12 +565,6 @@ void EditorAutoloadSettings::update_autoload() {
}
}
- ProjectSettings::AutoloadInfo prop_info;
- prop_info.name = info->name;
- prop_info.path = info->path;
- prop_info.is_singleton = info->is_singleton;
- ProjectSettings::get_singleton()->add_autoload(prop_info);
-
if (!info->in_editor && !info->is_singleton) {
// No reason to keep this node
memdelete(info->node);
diff --git a/editor/editor_feature_profile.cpp b/editor/editor_feature_profile.cpp
index 49fb16a095..7080cdbdd5 100644
--- a/editor/editor_feature_profile.cpp
+++ b/editor/editor_feature_profile.cpp
@@ -309,7 +309,11 @@ void EditorFeatureProfile::_bind_methods() {
BIND_ENUM_CONSTANT(FEATURE_MAX);
}
-EditorFeatureProfile::EditorFeatureProfile() {}
+EditorFeatureProfile::EditorFeatureProfile() {
+ for (int i = 0; i < FEATURE_MAX; i++) {
+ features_disabled[i] = false;
+ }
+}
//////////////////////////
@@ -746,6 +750,8 @@ void EditorFeatureProfileManager::_update_selected_profile() {
class_list->clear();
String profile = _get_selected_profile();
+ profile_actions[PROFILE_SET]->set_disabled(profile == current_profile);
+
if (profile.is_empty()) { //nothing selected, nothing edited
property_list->clear();
edited.unref();
diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp
index a261fc0f33..5d137ce290 100644
--- a/editor/editor_file_system.cpp
+++ b/editor/editor_file_system.cpp
@@ -620,7 +620,12 @@ bool EditorFileSystem::_update_scan_actions() {
if (_test_for_reimport(full_path, false)) {
//must reimport
reimports.push_back(full_path);
- reimports.append_array(_get_dependencies(full_path));
+ Vector<String> dependencies = _get_dependencies(full_path);
+ for (const String &dependency_path : dependencies) {
+ if (import_extensions.has(dependency_path.get_extension())) {
+ reimports.push_back(dependency_path);
+ }
+ }
} else {
//must not reimport, all was good
//update modified times, to avoid reimport
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp
index 0457dc81ff..a5397a8e6a 100644
--- a/editor/editor_inspector.cpp
+++ b/editor/editor_inspector.cpp
@@ -660,6 +660,7 @@ void EditorProperty::gui_input(const Ref<InputEvent> &p_event) {
}
if (keying_rect.has_point(mpos)) {
+ accept_event();
emit_signal(SNAME("property_keyed"), property, use_keying_next());
if (use_keying_next()) {
@@ -683,10 +684,12 @@ void EditorProperty::gui_input(const Ref<InputEvent> &p_event) {
}
}
if (delete_rect.has_point(mpos)) {
+ accept_event();
emit_signal(SNAME("property_deleted"), property);
}
if (revert_rect.has_point(mpos)) {
+ accept_event();
bool is_valid_revert = false;
Variant revert_value = EditorPropertyRevert::get_property_revert_value(object, property, &is_valid_revert);
ERR_FAIL_COND(!is_valid_revert);
@@ -695,11 +698,13 @@ void EditorProperty::gui_input(const Ref<InputEvent> &p_event) {
}
if (check_rect.has_point(mpos)) {
+ accept_event();
checked = !checked;
queue_redraw();
emit_signal(SNAME("property_checked"), property, checked);
}
} else if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MouseButton::RIGHT) {
+ accept_event();
_update_popup();
menu->set_position(get_screen_position() + get_local_mouse_position());
menu->reset_size();
@@ -1482,6 +1487,8 @@ void EditorInspectorSection::gui_input(const Ref<InputEvent> &p_event) {
return;
}
+ accept_event();
+
bool should_unfold = !object->editor_is_section_unfolded(section);
if (should_unfold) {
unfold();
@@ -1680,6 +1687,7 @@ void EditorInspectorArray::_panel_gui_input(Ref<InputEvent> p_event, int p_index
Ref<InputEventMouseButton> mb = p_event;
if (mb.is_valid()) {
if (movable && mb->get_button_index() == MouseButton::RIGHT) {
+ array_elements[p_index].panel->accept_event();
popup_array_index_pressed = begin_array_index + p_index;
rmb_popup->set_item_disabled(OPTION_MOVE_UP, popup_array_index_pressed == 0);
rmb_popup->set_item_disabled(OPTION_MOVE_DOWN, popup_array_index_pressed == count - 1);
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 961a8ab271..05a45f4bdb 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -5877,10 +5877,6 @@ void EditorNode::_feature_profile_changed() {
node_tabs->set_tab_hidden(node_tabs->get_tab_idx_from_control(NodeDock::get_singleton()), false);
fs_tabs->set_tab_hidden(fs_tabs->get_tab_idx_from_control(FileSystemDock::get_singleton()), false);
history_tabs->set_tab_hidden(history_tabs->get_tab_idx_from_control(history_dock), false);
- history_dock->set_visible(true);
- ImportDock::get_singleton()->set_visible(true);
- NodeDock::get_singleton()->set_visible(true);
- FileSystemDock::get_singleton()->set_visible(true);
main_editor_buttons[EDITOR_3D]->set_visible(true);
main_editor_buttons[EDITOR_SCRIPT]->set_visible(true);
if (AssetLibraryEditorPlugin::is_available()) {
diff --git a/platform/ios/app_delegate.mm b/platform/ios/app_delegate.mm
index fb183d52d4..3ebd530585 100644
--- a/platform/ios/app_delegate.mm
+++ b/platform/ios/app_delegate.mm
@@ -45,7 +45,7 @@
extern int gargc;
extern char **gargv;
-extern int ios_main(int, char **, String, String);
+extern int ios_main(int, char **);
extern void ios_finish();
@implementation AppDelegate
@@ -66,12 +66,7 @@ static ViewController *mainViewController = nil;
// Create a full-screen window
self.window = [[UIWindow alloc] initWithFrame:windowBounds];
- NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
- NSString *documentsDirectory = [paths objectAtIndex:0];
- paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
- NSString *cacheDirectory = [paths objectAtIndex:0];
-
- int err = ios_main(gargc, gargv, String::utf8([documentsDirectory UTF8String]), String::utf8([cacheDirectory UTF8String]));
+ int err = ios_main(gargc, gargv);
if (err != 0) {
// bail, things did not go very well for us, should probably output a message on screen with our error code...
diff --git a/platform/ios/godot_ios.mm b/platform/ios/godot_ios.mm
index 5f3e786b8a..abe7c59ce2 100644
--- a/platform/ios/godot_ios.mm
+++ b/platform/ios/godot_ios.mm
@@ -38,10 +38,6 @@
static OS_IOS *os = nullptr;
-int add_path(int, char **);
-int add_cmdline(int, char **);
-int ios_main(int, char **, String);
-
int add_path(int p_argc, char **p_args) {
NSString *str = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"godot_path"];
if (!str) {
@@ -74,7 +70,7 @@ int add_cmdline(int p_argc, char **p_args) {
return p_argc;
}
-int ios_main(int argc, char **argv, String data_dir, String cache_dir) {
+int ios_main(int argc, char **argv) {
size_t len = strlen(argv[0]);
while (len--) {
@@ -95,7 +91,7 @@ int ios_main(int argc, char **argv, String data_dir, String cache_dir) {
char cwd[512];
getcwd(cwd, sizeof(cwd));
printf("cwd %s\n", cwd);
- os = new OS_IOS(data_dir, cache_dir);
+ os = new OS_IOS();
// We must override main when testing is enabled
TEST_MAIN_OVERRIDE
diff --git a/platform/ios/os_ios.h b/platform/ios/os_ios.h
index 0c23b216c5..3560de7486 100644
--- a/platform/ios/os_ios.h
+++ b/platform/ios/os_ios.h
@@ -71,9 +71,6 @@ private:
virtual void finalize() override;
- String user_data_dir;
- String cache_dir;
-
bool is_focused = false;
void deinitialize_modules();
@@ -81,7 +78,7 @@ private:
public:
static OS_IOS *get_singleton();
- OS_IOS(String p_data_dir, String p_cache_dir);
+ OS_IOS();
~OS_IOS();
void initialize_modules();
diff --git a/platform/ios/os_ios.mm b/platform/ios/os_ios.mm
index 160724618f..9a8cfc2593 100644
--- a/platform/ios/os_ios.mm
+++ b/platform/ios/os_ios.mm
@@ -90,7 +90,7 @@ OS_IOS *OS_IOS::get_singleton() {
return (OS_IOS *)OS::get_singleton();
}
-OS_IOS::OS_IOS(String p_data_dir, String p_cache_dir) {
+OS_IOS::OS_IOS() {
for (int i = 0; i < ios_init_callbacks_count; ++i) {
ios_init_callbacks[i]();
}
@@ -101,11 +101,6 @@ OS_IOS::OS_IOS(String p_data_dir, String p_cache_dir) {
main_loop = nullptr;
- // can't call set_data_dir from here, since it requires DirAccess
- // which is initialized in initialize_core
- user_data_dir = p_data_dir;
- cache_dir = p_cache_dir;
-
Vector<Logger *> loggers;
loggers.push_back(memnew(SyslogLogger));
#ifdef DEBUG_ENABLED
@@ -272,20 +267,25 @@ Error OS_IOS::shell_open(String p_uri) {
}
String OS_IOS::get_user_data_dir() const {
- static bool user_data_dir_set = false;
- if (user_data_dir_set) {
- String old_dir = user_data_dir;
- Ref<DirAccess> da = DirAccess::open(old_dir);
- const_cast<OS_IOS *>(this)->user_data_dir = da->get_current_dir();
- user_data_dir_set = true;
-
- printf("setting data dir to %s from %s\n", user_data_dir.utf8().get_data(), old_dir.utf8().get_data());
+ static String ret;
+ if (ret.is_empty()) {
+ NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
+ if (paths && [paths count] >= 1) {
+ ret.parse_utf8([[paths firstObject] UTF8String]);
+ }
}
- return user_data_dir;
+ return ret;
}
String OS_IOS::get_cache_path() const {
- return cache_dir;
+ static String ret;
+ if (ret.is_empty()) {
+ NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
+ if (paths && [paths count] >= 1) {
+ ret.parse_utf8([[paths firstObject] UTF8String]);
+ }
+ }
+ return ret;
}
String OS_IOS::get_locale() const {