From 1656d5e88a301afaec65e13566d72abecb1c8d3b Mon Sep 17 00:00:00 2001 From: Arno Date: Mon, 24 May 2010 14:30:24 +0200 Subject: Close PictureViewer on exit Close PictureViewer window when exiting SheMov. --- filesystemwidget.h | 1 + shemov.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/filesystemwidget.h b/filesystemwidget.h index 2fb1bc1..0f70bea 100644 --- a/filesystemwidget.h +++ b/filesystemwidget.h @@ -35,6 +35,7 @@ class FilesystemWidget : public QWidget { QFileSystemModel *dirModel() { return mModel; }; const QString windowTitle() const { return mWindowTitle; }; void setArchiveDialog(ArchiveEditDialog *dlg); + PictureViewer *pictureViewer() { return mPicViewer; }; signals: void windowTitle(const QString &); diff --git a/shemov.cpp b/shemov.cpp index 2bfe8c0..fa87d35 100644 --- a/shemov.cpp +++ b/shemov.cpp @@ -44,6 +44,7 @@ #include "filesystemfileproxy.h" #include "moviemodelsingleton.h" #include "listmodelsingleton.h" +#include "pictureviewer.h" SheMov::SheMov(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, flags), mOpenWithGroupFS(0), mOpenWithGroupAV(0) { qApp->setWindowIcon(QIcon(":/shemov.png")); @@ -114,6 +115,7 @@ SheMov::SheMov(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, fla void SheMov::closeEvent(QCloseEvent *event){ mFSWidget->writeSettings(); + mFSWidget->pictureViewer()->close(); writeSettings(); event->accept(); } -- cgit v1.2.3-70-g09d2