From 181be7be4cc5a084f5a13e9a9bfece409a2cc0e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Wed, 26 Jun 2013 23:30:40 +0200 Subject: [PATCH] removed unused images from qrc files fixed "delete comics" feature (getSelectedComics returns now a sorted list of QModelIndex) --- YACReader/images.qrc | 22 ---------------------- YACReaderLibrary/images.qrc | 27 +++------------------------ YACReaderLibrary/library_window.cpp | 8 ++++++++ common/yacreader_flow_gl.cpp | 2 +- 4 files changed, 12 insertions(+), 47 deletions(-) diff --git a/YACReader/images.qrc b/YACReader/images.qrc index 543c5ad8..535f84f2 100644 --- a/YACReader/images.qrc +++ b/YACReader/images.qrc @@ -1,40 +1,18 @@ - ../images/open.png - ../images/openFolder.png - ../images/next.png - ../images/prev.png ../images/icon.png - ../images/zoom.png - ../images/fit.png ../images/goto.png - ../images/help.png - ../images/center.png - ../images/options.png ../images/comicFolder.png - ../images/save.png - ../images/rotateL.png - ../images/rotateR.png ../images/flow1.png ../images/flow2.png ../images/flow3.png ../images/flow4.png ../images/flow5.png - ../images/bookmark.png - ../images/setBookmark.png ../images/notCover.png - ../images/previousComic.png - ../images/nextComic.png - ../images/deleteLibrary.png - ../images/properties.png - ../images/doublePage.png ../images/shortcuts.png ../images/close.png ../images/up.png ../images/down.png - ../images/dictionary.png - ../images/alwaysOnTop.png - ../images/adjustToFullSize.png ../images/numPagesLabel.png ../images/numPagesLabelMedium.png ../images/numPagesLabelBig.png diff --git a/YACReaderLibrary/images.qrc b/YACReaderLibrary/images.qrc index c99c5401..05e084a6 100644 --- a/YACReaderLibrary/images.qrc +++ b/YACReaderLibrary/images.qrc @@ -1,23 +1,15 @@ - ../images/deleteLibrary.png ../images/folder.png - ../images/help.png - ../images/icon.png ../images/iconLibrary.png ../images/new.png ../images/openLibrary.png - ../images/removeLibrary.png ../images/removeLibraryIcon.png - ../images/updateLibrary.png ../images/updateLibraryIcon.png ../images/comicFolder.png ../images/notCover.png ../images/edit.png ../images/editIcon.png - ../images/fit.png - ../images/properties.png - ../images/options.png ../images/flow1.png ../images/flow2.png ../images/flow3.png @@ -29,12 +21,10 @@ ../images/exportLibraryIcon.png ../images/open.png ../images/coversPackage.png - ../images/setRead.png ../images/setAllRead.png ../images/setUnread.png ../images/setAllUnread.png ../images/showMarks.png - ../images/importCover.png ../images/editComic.png ../images/selectAll.png ../images/hideComicFlow.png @@ -45,22 +35,11 @@ ../images/db.png ../images/asignNumber.png ../images/defaultCover.png - ../images/server.png ../images/iphoneConfig.png - ../images/qrMessage.png ../images/onStartFlowSelection.png ../images/onStartFlowSelection_es.png ../images/useNewFlowButton.png ../images/useOldFlowButton.png - ../images/zip.png - ../images/rar.png - ../images/tar.png - ../images/7z.png - ../images/pdf.png - ../images/comicZip.png - ../images/comicRar.png - ../images/comicTar.png - ../images/comic7z.png ../images/serverConfigBackground.png ../images/noLibrariesIcon.png ../images/noLibrariesLine.png @@ -77,7 +56,7 @@ ../images/trash.png ../images/setReadButton.png ../images/openInYACReader.png - ../images/deleting_progress/imgTopLeft.png + ../images/main_toolbar/divider.png ../images/collapsed_branch_osx.png ../images/expanded_branch_osx.png @@ -105,6 +84,6 @@ ../images/collapsed_branch_selected.png ../images/previousCoverPage.png ../images/nextCoverPage.png - ../images/busy_background.png + diff --git a/YACReaderLibrary/library_window.cpp b/YACReaderLibrary/library_window.cpp index 8f57481d..d5742464 100644 --- a/YACReaderLibrary/library_window.cpp +++ b/YACReaderLibrary/library_window.cpp @@ -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()selectionModel()->selectedRows(); + + qSort(selection.begin(),selection.end(),lessThanModelIndexRow); + if(selection.count()==0) { comicView->selectRow(comicFlow->centerIndex()); diff --git a/common/yacreader_flow_gl.cpp b/common/yacreader_flow_gl.cpp index 840836ae..2eb6644b 100644 --- a/common/yacreader_flow_gl.cpp +++ b/common/yacreader_flow_gl.cpp @@ -663,7 +663,7 @@ void YACReaderFlowGL::insert(char *name, GLuint Tex, float x, float y,int item) void YACReaderFlowGL::remove(int item) { //reposition current selection - if(item == currentSelected && currentSelected != 0){ + if(item <= currentSelected && currentSelected != 0){ currentSelected--; }