- Fixed sending the "clear" flag even when empty results are send from the musik::core::Query::ListSelection (issue 15).

- Fixed a small bug in the MetadataFilter.
This commit is contained in:
Daniel Önnerby 2008-04-21 19:22:23 +00:00
parent 095ac9a4a8
commit dcefa4afb1
2 changed files with 6 additions and 1 deletions

View File

@ -540,6 +540,11 @@ void Query::ListSelection::QueryForMetadata(const char *metakey,const char *sql,
tempMetadataValues.reserve(10);
int row(0);
{
boost::mutex::scoped_lock lock(oLibrary->oResultMutex);
this->metadataResults[metakey];
}
while(metaValueStmt.Step()==db::ReturnCode::Row){
tempMetadataValues.push_back(
MetadataValuePtr(

View File

@ -67,7 +67,7 @@ uistring MetadataFilterModel::CellValueToString(int rowIndex, ListView::Colum
return (format(_T("All (%1% %2%)")) % this->metadata.size() % this->controller->metadataKey).str();
}
if(rowIndex<this->metadata.size()){
if(rowIndex<=this->metadata.size()){
return win32cpp::Escape(this->metadata[rowIndex-1]->value);
}else{
return uistring();