+ add "remove" button in the download manager

This commit is contained in:
kelson42 2011-06-28 18:52:20 +00:00
parent 2b50a1d505
commit 5b679f6b1b
2 changed files with 3 additions and 2 deletions

View File

@ -92,7 +92,7 @@ namespace kiwix {
}
bool Library::removeBookByIndex(const unsigned int bookIndex) {
books.erase(books.begin()+bookIndex-1);
books.erase(books.begin()+bookIndex);
return true;
}

View File

@ -248,8 +248,9 @@ namespace kiwix {
unsigned int bookIndex = 0;
std::vector<kiwix::Book>::iterator itr;
for ( itr = library.books.begin(); itr != library.books.end(); ++itr ) {
if ( itr->id == id)
if ( itr->id == id) {
return this->library.removeBookByIndex(bookIndex);
}
bookIndex++;
}
return false;