diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-06-03 13:58:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-03 13:58:52 +0200 |
commit | b3162a2a28e039c32d138fdf7ae464cf6b19cd18 (patch) | |
tree | c78a60976e597b7dec06f16941890822a3f6b79f /editor | |
parent | 164fae9c1d2994100e7e2239662ff798e10af0f1 (diff) | |
parent | a5f1635bf20b0bcf30241d62208462556d0b5557 (diff) |
Merge pull request #29412 from YeldhamDev/audio_editor_pause_fix
Fix pausing in audio player editor acting the same as stopping
Diffstat (limited to 'editor')
-rw-r--r-- | editor/plugins/audio_stream_editor_plugin.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/editor/plugins/audio_stream_editor_plugin.cpp b/editor/plugins/audio_stream_editor_plugin.cpp index 172096b1a7..0ab3d26c85 100644 --- a/editor/plugins/audio_stream_editor_plugin.cpp +++ b/editor/plugins/audio_stream_editor_plugin.cpp @@ -53,7 +53,6 @@ void AudioStreamEditor::_notification(int p_what) { if (p_what == NOTIFICATION_PROCESS) { _current = _player->get_playback_position(); _indicator->update(); - _preview->update(); } if (p_what == NOTIFICATION_VISIBILITY_CHANGED) { @@ -121,15 +120,19 @@ void AudioStreamEditor::_play() { void AudioStreamEditor::_stop() { _player->stop(); - _on_finished(); + _play_button->set_icon(get_icon("MainPlay", "EditorIcons")); + _current = 0; + _indicator->update(); + set_process(false); } void AudioStreamEditor::_on_finished() { _play_button->set_icon(get_icon("MainPlay", "EditorIcons")); - _current = 0; - _indicator->update(); - set_process(false); + if (_current == _player->get_stream()->get_length()) { + _current = 0; + _indicator->update(); + } } void AudioStreamEditor::_draw_indicator() { |