From 3f19942183629439662c17eda5af4eab005649af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Mon, 25 Mar 2013 16:35:57 +0100 Subject: [PATCH] Corregida la ordenaci?n de c?mics en el visor --- CHANGELOG.txt | 3 ++- YACReader/main_window_viewer.cpp | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 6c0f65b9..c9ffec19 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -14,4 +14,5 @@ InformationLabel se muestra en 3 tama Corregido bug que causaba que las marcas de cómic leído no se dibujasen adecuadamente. Se recuerda si se debe mostrar o no la "label" información. Corregido bug que provocaba el fallo de YACReader al pasar muy rápido las páginas. -Añadida columna "Tamaño" a la lista de cómics en YACReaderLibrary \ No newline at end of file +Añadida columna "Tamaño" a la lista de cómics en YACReaderLibrary +Añadida la ordinación "natural" de los comics que hay en directorio del cómic actual. \ No newline at end of file diff --git a/YACReader/main_window_viewer.cpp b/YACReader/main_window_viewer.cpp index 8680fe5a..24c28687 100644 --- a/YACReader/main_window_viewer.cpp +++ b/YACReader/main_window_viewer.cpp @@ -9,8 +9,10 @@ #include "bookmarks_dialog.h" #include "shortcuts_dialog.h" #include "width_slider.h" +#include "qnaturalsorting.h" #include +#include MainWindowViewer::MainWindowViewer() :QMainWindow(),fullscreen(false),toolbars(true),alwaysOnTop(false),currentDirectory("."),currentDirectoryImgDest(".") @@ -665,6 +667,8 @@ void MainWindowViewer::getSiblingComics(QString path,QString currentComic) d.setNameFilters(QStringList() << "*.cbr" << "*.cbz" << "*.rar" << "*.zip" << "*.tar" << "*.pdf" << "*.7z" << "*.cb7" << "*.arj" << "*.cbt"); d.setSorting(QDir::Name|QDir::IgnoreCase|QDir::LocaleAware); QStringList list = d.entryList(); + qSort(list.begin(),list.end(),naturalSortLessThanCI); + //std::sort(list.begin(),list.end(),naturalSortLessThanCI); int index = list.indexOf(currentComic); if(index == -1) //comic not found {