UI: Sort audio controls by source name
Audio controls in OBS Mixer and Advanced Audio Properties window are not sorted at all. Every time OBS is restarted they get shuffled (Jim note: This is due to json object hashing). The order of these controls is additionally not consistent between the mixer and the advanced audio properties window. Closes obsproject/obs-studio#1242
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include <QLabel>
|
||||
#include "window-basic-adv-audio.hpp"
|
||||
#include "window-basic-main.hpp"
|
||||
#include "item-widget-helpers.hpp"
|
||||
#include "adv-audio-control.hpp"
|
||||
#include "obs-app.hpp"
|
||||
#include "qt-wrappers.hpp"
|
||||
@@ -133,7 +134,12 @@ void OBSBasicAdvAudio::OBSSourceRemoved(void *param, calldata_t *calldata)
|
||||
inline void OBSBasicAdvAudio::AddAudioSource(obs_source_t *source)
|
||||
{
|
||||
OBSAdvAudioCtrl *control = new OBSAdvAudioCtrl(mainLayout, source);
|
||||
controls.push_back(control);
|
||||
|
||||
InsertQObjectByName(controls, control);
|
||||
|
||||
for (auto control : controls) {
|
||||
control->ShowAudioControl(mainLayout);
|
||||
}
|
||||
}
|
||||
|
||||
void OBSBasicAdvAudio::SourceAdded(OBSSource source)
|
||||
|
Reference in New Issue
Block a user