mirror of
https://github.com/Relintai/gdfxr.git
synced 2025-02-20 15:14:32 +01:00
Handle null resource for beta15
This commit is contained in:
parent
140033208e
commit
eb69d75178
@ -86,7 +86,14 @@ func _notification(what: int):
|
|||||||
popup.set_item_icon(popup.get_item_index(ExtraOption.PASTE), get_theme_icon("ActionPaste", "EditorIcons"))
|
popup.set_item_icon(popup.get_item_index(ExtraOption.PASTE), get_theme_icon("ActionPaste", "EditorIcons"))
|
||||||
|
|
||||||
|
|
||||||
func edit(path: String) -> void:
|
func edit(object: Variant) -> void:
|
||||||
|
if not object:
|
||||||
|
if not _modified:
|
||||||
|
_set_editing_file("")
|
||||||
|
# TODO: prompt?
|
||||||
|
return
|
||||||
|
|
||||||
|
var path := object.resource_path as String
|
||||||
if _modified:
|
if _modified:
|
||||||
_popup_confirm(
|
_popup_confirm(
|
||||||
translator.tr("There are unsaved changes.\nOpen '%s' anyway?") % path,
|
translator.tr("There are unsaved changes.\nOpen '%s' anyway?") % path,
|
||||||
|
@ -29,7 +29,7 @@ func _handles(object: Variant) -> bool:
|
|||||||
|
|
||||||
|
|
||||||
func _edit(object: Variant):
|
func _edit(object: Variant):
|
||||||
sfxr_editor.edit(object.resource_path) # Should already passed `handles()` checks
|
sfxr_editor.edit(object)
|
||||||
|
|
||||||
|
|
||||||
func _make_visible(visible: bool):
|
func _make_visible(visible: bool):
|
||||||
|
@ -15,10 +15,6 @@ run/main_scene="res://example/Example.tscn"
|
|||||||
config/features=PackedStringArray("4.0")
|
config/features=PackedStringArray("4.0")
|
||||||
config/icon="res://icon.png"
|
config/icon="res://icon.png"
|
||||||
|
|
||||||
[editor]
|
|
||||||
|
|
||||||
export/convert_text_resources_to_binary=true
|
|
||||||
|
|
||||||
[editor_plugins]
|
[editor_plugins]
|
||||||
|
|
||||||
enabled=PackedStringArray("res://addons/gdfxr/plugin.cfg")
|
enabled=PackedStringArray("res://addons/gdfxr/plugin.cfg")
|
||||||
|
Loading…
Reference in New Issue
Block a user