Skip to content

Commit

Permalink
Prevent showing AudioStream preview for non-WAV types
Browse files Browse the repository at this point in the history
  • Loading branch information
Chaosus committed Dec 18, 2022
1 parent 0bb94df commit 0fcf6a1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion editor/plugins/audio_stream_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include "editor/audio_stream_preview.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
#include "scene/resources/audio_stream_wav.h"

// AudioStreamEditor

Expand Down Expand Up @@ -258,7 +259,7 @@ AudioStreamEditor::AudioStreamEditor() {
// EditorInspectorPluginAudioStream

bool EditorInspectorPluginAudioStream::can_handle(Object *p_object) {
return Object::cast_to<AudioStream>(p_object) != nullptr;
return Object::cast_to<AudioStreamWAV>(p_object) != nullptr;
}

void EditorInspectorPluginAudioStream::parse_begin(Object *p_object) {
Expand Down

0 comments on commit 0fcf6a1

Please sign in to comment.