Fix copying a file's Meta Info into the Meta Data tab: Retain original "position" value rather than overwriting it.
This commit is contained in:
parent
dd98a78fad
commit
1b519d48c7
@ -2314,6 +2314,7 @@ void MainWindow::showDetailsButtonClicked(void)
|
||||
iResult = metaInfoDialog->exec(file, index.row() > 0, index.row() < m_fileListModel->rowCount() - 1);
|
||||
);
|
||||
|
||||
//Copy all info to Meta Info tab
|
||||
if(iResult == INT_MAX)
|
||||
{
|
||||
m_metaInfoModel->assignInfoFrom(file);
|
||||
|
@ -480,6 +480,11 @@ Qt::ItemFlags MetaInfoModel::flags(const QModelIndex &index) const
|
||||
void MetaInfoModel::assignInfoFrom(const AudioFileModel &file)
|
||||
{
|
||||
beginResetModel();
|
||||
const unsigned int position = m_metaInfo->position();
|
||||
m_metaInfo->update(file.metaInfo(), true);
|
||||
if(m_offset)
|
||||
{
|
||||
m_metaInfo->setPosition(position ? UINT_MAX : 0);
|
||||
}
|
||||
endResetModel();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user