fix resetting of song mix menu item after import is done
Showing the changes to interface/src/Application.cpp (1 of 3 files). Show all
Unified · Split
| @@ -2128,13 +2128,21 @@ void Application::toggleMixedSong() { · 2127 unmodified lines | ||
| 2128 | 2128 | |
| 2129 | 2129 | QByteArray filenameArray = filename.toLocal8Bit(); |
| 2130 | 2130 | _audio.importSongToMixWithMicrophone(filenameArray.data()); |
| 2131 | − _rawAudioMicrophoneMix->setText("Stop Mixing Song"); | |
| 2131 | + resetSongMixMenuItem(); | |
| 2132 | 2132 | } else { |
| 2133 | 2133 | _audio.stopMixingSongWithMicrophone(); |
| 2134 | − _rawAudioMicrophoneMix->setText("Mix RAW Song"); | |
| 2134 | + resetSongMixMenuItem(); | |
| 2135 | 2135 | } |
| 2136 | 2136 | } |
| 2137 | 2137 | |
| 2138 | +void Application::resetSongMixMenuItem() { | |
| 2139 | + if (_audio.getSongFileBytes() == 0) { | |
| 2140 | + _rawAudioMicrophoneMix->setText("Mix RAW Song"); | |
| 2141 | + } else { | |
| 2142 | + _rawAudioMicrophoneMix->setText("Stop Mixing Song"); | |
| 2143 | + } | |
| 2144 | + | |
| 2145 | +} | |
| 2138 | 2146 | |
| 2139 | 2147 | void Application::updateFrustumRenderModeAction() { |
| 2140 | 2148 | switch (_frustumDrawingMode) { |