Sort encoder options alphabetically.
This commit is contained in:
parent
2212dbacab
commit
a3ddca2f4a
|
@ -3038,8 +3038,8 @@ void LibavOptionsPage::initCodecLists(void)
|
|||
initSampleRateSelect( audioEncSel->currentText().toStdString().c_str() );
|
||||
initChannelLayoutSelect( audioEncSel->currentText().toStdString().c_str() );
|
||||
|
||||
videoEncSel->model()->sort(0);
|
||||
audioEncSel->model()->sort(0);
|
||||
videoEncSel->model()->sort(0, Qt::AscendingOrder);
|
||||
audioEncSel->model()->sort(0, Qt::AscendingOrder);
|
||||
}
|
||||
//-----------------------------------------------------
|
||||
void LibavOptionsPage::includeAudioChanged(bool checked)
|
||||
|
@ -3403,6 +3403,7 @@ LibavEncOptWin::LibavEncOptWin(int type, QWidget *parent)
|
|||
}
|
||||
obj = ctx_child = av_opt_child_next( ctx, ctx_child );
|
||||
}
|
||||
sortItems();
|
||||
|
||||
tree->resizeColumnToContents(2);
|
||||
|
||||
|
@ -3467,6 +3468,19 @@ void LibavEncOptWin::resetDefaultsCB(void)
|
|||
updateItems();
|
||||
}
|
||||
//-----------------------------------------------------
|
||||
void LibavEncOptWin::sortItems(void)
|
||||
{
|
||||
QTreeWidgetItem *groupItem;
|
||||
|
||||
for (int i=0; i<tree->topLevelItemCount(); i++)
|
||||
{
|
||||
groupItem = tree->topLevelItem(i);
|
||||
|
||||
groupItem->sortChildren(0, Qt::AscendingOrder);
|
||||
}
|
||||
tree->viewport()->update();
|
||||
}
|
||||
//-----------------------------------------------------
|
||||
void LibavEncOptWin::updateItems(void)
|
||||
{
|
||||
QTreeWidgetItem *groupItem;
|
||||
|
|
|
@ -160,6 +160,7 @@ public:
|
|||
protected:
|
||||
void closeEvent(QCloseEvent *event);
|
||||
void updateItems(void);
|
||||
void sortItems(void);
|
||||
|
||||
int type;
|
||||
QTreeWidget *tree;
|
||||
|
|
Loading…
Reference in New Issue