| 657 | } |
| 658 | |
| 659 | void ExportAudioDialog::UpdateExportSettings() |
| 660 | { |
| 661 | if(!mExportSettingsDirty) |
| 662 | return; |
| 663 | |
| 664 | const auto selectedPlugin = mExportOptionsPanel->GetPlugin(); |
| 665 | if(selectedPlugin == nullptr) |
| 666 | return; |
| 667 | |
| 668 | const auto selectedFormat = mExportOptionsPanel->GetFormat(); |
| 669 | |
| 670 | if(mRangeSplit->GetValue()) |
| 671 | { |
| 672 | const auto byName = mSplitUseName->GetValue() || mSplitUseNumAndName->GetValue(); |
| 673 | const auto addNumber = mSplitUseNumAndName->GetValue(); |
| 674 | const auto prefix = mSplitFileNamePrefix->GetValue(); |
| 675 | |
| 676 | if(mSplitByLabels->GetValue()) |
| 677 | UpdateLabelExportSettings(*selectedPlugin, selectedFormat, byName, addNumber, prefix); |
| 678 | else if(mSplitByTracks->GetValue()) |
| 679 | UpdateTrackExportSettings(*selectedPlugin, selectedFormat, byName, addNumber, prefix); |
| 680 | |
| 681 | mExportSettingsDirty = false; |
| 682 | } |
| 683 | } |
| 684 | |
| 685 | void ExportAudioDialog::UpdateLabelExportSettings(const ExportPlugin& plugin, int formatIndex, bool byName, bool addNumber, const wxString& prefix) |
| 686 | { |