@@ -456,9 +456,9 @@ func _on_OpenSprite_files_selected(paths: PackedStringArray) -> void:
456
456
func show_save_dialog (project := Global .current_project ) -> void :
457
457
Global .dialog_open (true , true )
458
458
if OS .get_name () == "Web" :
459
- var save_filename := save_sprite_html5 .get_node ("% FileNameLineEdit" )
460
459
save_sprite_html5 .popup_centered ()
461
- save_filename .text = project .name
460
+ var save_filename_line_edit := save_sprite_html5 .get_node ("% FileNameLineEdit" )
461
+ save_filename_line_edit .text = project .name
462
462
else :
463
463
save_sprite_dialog .popup_centered ()
464
464
save_sprite_dialog .get_line_edit ().text = project .name
@@ -473,12 +473,15 @@ func _on_save_sprite_visibility_changed() -> void:
473
473
is_quitting_on_save = false
474
474
475
475
476
- func save_project (path : String ) -> void :
476
+ func save_project (path : String , through_dialog : = true ) -> void :
477
477
var project_to_save := Global .current_project
478
478
if is_quitting_on_save :
479
479
project_to_save = changed_projects_on_quit [0 ]
480
480
var include_blended := false
481
481
if OS .get_name () == "Web" :
482
+ if through_dialog :
483
+ var save_filename_line_edit := save_sprite_html5 .get_node ("% FileNameLineEdit" )
484
+ project_to_save .name = save_filename_line_edit .text
482
485
var file_name := project_to_save .name + ".pxo"
483
486
path = "user://" .path_join (file_name )
484
487
include_blended = save_sprite_html5 .get_node ("% IncludeBlended" ).button_pressed
0 commit comments