Fix regression from d5c236f183: should take first audio link from each article

This commit is contained in:
Timon Wong 2013-05-31 11:46:51 +08:00
parent d5c236f183
commit 43427e3958
2 changed files with 3 additions and 3 deletions

View file

@ -33,6 +33,7 @@ std::string makeAudioLinkScript( std::string const & url,
escaped = ( ch == '\\' );
}
return "if ( !gdAudioLinks.first ) { gdAudioLinks.first = " + ref + "; }" +
"gdAudioLinks['" + dictionaryId + "'] = " + ref + ";";
std::string audioLinkForDict = "gdAudioLinks['" + dictionaryId + "']";
return "gdAudioLinks.first = gdAudioLinks.first || " + ref + ";" +
audioLinkForDict + " = " + audioLinkForDict + " || " + ref + ";";
}

View file

@ -2181,7 +2181,6 @@ void MainWindow::dictsListItemActivated( QListWidgetItem * item )
{
QString id = item->data( Qt::UserRole ).toString();
getCurrentArticleView()->jumpToDictionary( id );
updatePronounceAvailability();
}
void MainWindow::dictsListSelectionChanged()