Fix empty AudioStream name in the resource picker.

This commit is contained in:
Pāvels Nadtočajevs
2026-06-11 09:08:58 +03:00
parent 3df26a02c4
commit e7ca89819f
+3 -1
View File
@@ -1756,8 +1756,10 @@ void EditorAudioStreamPicker::_preview_draw() {
text = audio_stream->get_name();
} else if (audio_stream->get_path().is_resource_file()) {
text = audio_stream->get_path().get_file();
} else {
} else if (audio_stream->get_class() != "AudioStream") {
text = audio_stream->get_class().replace_first("AudioStream", "");
} else {
text = audio_stream->get_class();
}
stream_preview_rect->draw_texture(icon, Point2i(EDSCALE * 4, rect.position.y + (rect.size.height - icon->get_height()) / 2), icon_modulate);