kyouryuukunn / renpy-ActionEditor3

125 stars 13 forks source link

Going to select a sound and using Right Click to change your mind shows an error that blank "" is not loadable. #37

Closed paxogre closed 1 month ago

paxogre commented 1 month ago

Thought I had the sound file I wanted in the directory and didn't but to fix this I checked if v was blank "" and if so, just gave a notification that no file was selected.

ActionEditor.rpy

    def edit_playing_file(channel, time=None):
        if time is None:
            time = current_time
        if time not in sound_keyframes[channel] and is_playing(channel, time, time):
            renpy.notify(_("This channel is already used in this time"))
            return
        default = ""
        if time in sound_keyframes[channel]:
            default = sound_keyframes[channel][time][1:-1]
        v = renpy.invoke_in_new_context(renpy.call_screen, "_sound_selector", default=default)
        if v.strip() == "":
            renpy.notify(_("No audio file was selected"))
            return