From 2cb4b753f71f0ed7b7b29fab357fb5cb86f1a000 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Tue, 30 Apr 2013 19:52:18 +0200 Subject: [PATCH] corregido bug que evitaba que la restauraci?n desde pantalla completa a maximizada no se hicese correctamente --- YACReader/main_window_viewer.cpp | 8 +++++++- YACReader/main_window_viewer.h | 1 + YACReaderLibrary/library_window.cpp | 9 +++++++-- YACReaderLibrary/library_window.h | 2 ++ 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/YACReader/main_window_viewer.cpp b/YACReader/main_window_viewer.cpp index 24c28687..939b9e66 100644 --- a/YACReader/main_window_viewer.cpp +++ b/YACReader/main_window_viewer.cpp @@ -558,6 +558,8 @@ void MainWindowViewer::toggleFullScreen() void MainWindowViewer::toFullScreen() { + fromMaximized = this->isMaximized(); + hideToolBars(); viewer->hide(); viewer->fullscreen = true;//TODO, change by the right use of windowState(); @@ -573,7 +575,11 @@ void MainWindowViewer::toNormal() viewer->hide(); viewer->fullscreen = false;//TODO, change by the right use of windowState(); //viewer->hideMagnifyingGlass(); - showNormal(); + if(fromMaximized) + showMaximized(); + else + showNormal(); + if(Configuration::getConfiguration().getShowToolbars()) showToolBars(); viewer->show(); diff --git a/YACReader/main_window_viewer.h b/YACReader/main_window_viewer.h index 1d16a227..4e7cfcfd 100644 --- a/YACReader/main_window_viewer.h +++ b/YACReader/main_window_viewer.h @@ -53,6 +53,7 @@ class YACReaderSliderAction; bool fullscreen; bool toolbars; bool alwaysOnTop; + bool fromMaximized; QString currentDirectory; QString currentDirectoryImgDest; diff --git a/YACReaderLibrary/library_window.cpp b/YACReaderLibrary/library_window.cpp index 7eb0e299..6b7605e8 100644 --- a/YACReaderLibrary/library_window.cpp +++ b/YACReaderLibrary/library_window.cpp @@ -1169,6 +1169,8 @@ void LibraryWindow::toggleFullScreen() void LibraryWindow::toFullScreen() { + fromMaximized = this->isMaximized(); + comicFlow->hide(); comicFlow->setSlideSize(slideSizeF); comicFlow->setCenterIndex(comicFlow->centerIndex()); @@ -1199,7 +1201,10 @@ void LibraryWindow::toNormal() libraryToolBar->show(); comicFlow->show(); - showNormal(); + if(fromMaximized) + showMaximized(); + else + showNormal(); } void LibraryWindow::setFoldersFilter(QString filter) @@ -1479,5 +1484,5 @@ QString LibraryWindow::getFolderName(const QString & libraryName, qulonglong id) void LibraryWindow::closeEvent ( QCloseEvent * event ) { settings->setValue(MAIN_WINDOW_GEOMETRY, saveGeometry()); - settings->setValue(MAIN_WINDOW_STATE, saveState()); + //settings->setValue(MAIN_WINDOW_STATE, saveState()); } \ No newline at end of file diff --git a/YACReaderLibrary/library_window.h b/YACReaderLibrary/library_window.h index 1a0a9f8d..7d75b297 100644 --- a/YACReaderLibrary/library_window.h +++ b/YACReaderLibrary/library_window.h @@ -50,6 +50,8 @@ private: PropertiesDialog * propertiesDialog; bool fullscreen; bool importedCovers; //if true, the library is read only (not updates,open comic or properties) + bool fromMaximized; + //Ya no se usan proxies, el rendimiento de la BD es suficiente //YACReaderTreeSearch * proxyFilter; //YACReaderSortComics * proxySort;