mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Don't invoke adb with no runnable Android preset
This commit is contained in:
@@ -110,8 +110,13 @@ void EditorExport::save_presets() {
|
||||
save_timer->start();
|
||||
}
|
||||
|
||||
void EditorExport::emit_presets_runnable_changed() {
|
||||
emit_signal(_export_presets_runnable_updated);
|
||||
}
|
||||
|
||||
void EditorExport::_bind_methods() {
|
||||
ADD_SIGNAL(MethodInfo("export_presets_updated"));
|
||||
ADD_SIGNAL(MethodInfo(_export_presets_updated));
|
||||
ADD_SIGNAL(MethodInfo(_export_presets_runnable_updated));
|
||||
}
|
||||
|
||||
void EditorExport::add_export_platform(const Ref<EditorExportPlatform> &p_platform) {
|
||||
@@ -135,6 +140,7 @@ void EditorExport::add_export_preset(const Ref<EditorExportPreset> &p_preset, in
|
||||
} else {
|
||||
export_presets.insert(p_at_pos, p_preset);
|
||||
}
|
||||
emit_presets_runnable_changed();
|
||||
}
|
||||
|
||||
int EditorExport::get_export_preset_count() const {
|
||||
@@ -149,6 +155,7 @@ Ref<EditorExportPreset> EditorExport::get_export_preset(int p_idx) {
|
||||
void EditorExport::remove_export_preset(int p_idx) {
|
||||
export_presets.remove_at(p_idx);
|
||||
save_presets();
|
||||
emit_presets_runnable_changed();
|
||||
}
|
||||
|
||||
void EditorExport::add_export_plugin(const Ref<EditorExportPlugin> &p_plugin) {
|
||||
@@ -380,6 +387,10 @@ bool EditorExport::poll_export_platforms() {
|
||||
return changed;
|
||||
}
|
||||
|
||||
void EditorExport::connect_presets_runnable_updated(const Callable &p_target) {
|
||||
connect(_export_presets_runnable_updated, p_target);
|
||||
}
|
||||
|
||||
EditorExport::EditorExport() {
|
||||
save_timer = memnew(Timer);
|
||||
add_child(save_timer);
|
||||
@@ -388,6 +399,7 @@ EditorExport::EditorExport() {
|
||||
save_timer->connect("timeout", callable_mp(this, &EditorExport::_save));
|
||||
|
||||
_export_presets_updated = "export_presets_updated";
|
||||
_export_presets_runnable_updated = "export_presets_runnable_updated";
|
||||
|
||||
singleton = this;
|
||||
set_process(true);
|
||||
|
||||
Reference in New Issue
Block a user