removed unused images from qrc files

fixed "delete comics" feature (getSelectedComics returns now a sorted list of QModelIndex)
This commit is contained in:
Luis Ángel San Martín
2013-06-26 23:30:40 +02:00
parent 7b82b23962
commit 181be7be4c
4 changed files with 12 additions and 47 deletions

View File

@ -1544,10 +1544,18 @@ void LibraryWindow::manageOpeningLibraryError(const QString & error)
QMessageBox::critical(this,tr("Error opening the library"),error);
}
bool lessThanModelIndexRow(const QModelIndex & m1, const QModelIndex & m2)
{
return m1.row()<m2.row();
}
QModelIndexList LibraryWindow::getSelectedComics()
{
//se fuerza a que haya almenos una fila seleccionada TODO comprobar se se puede forzar a la tabla a que lo haga autom<6F>ticamente
QModelIndexList selection = comicView->selectionModel()->selectedRows();
qSort(selection.begin(),selection.end(),lessThanModelIndexRow);
if(selection.count()==0)
{
comicView->selectRow(comicFlow->centerIndex());