diff --git a/snapshot.cpp b/snapshot.cpp
--- a/snapshot.cpp
+++ b/snapshot.cpp
@@ -53,7 +53,7 @@ void SnapShot::show()
void SnapShot::viewClosed()
{
- delete view;
+ view->deleteLater();
view = NULL;
}
diff --git a/snapshotview.cpp b/snapshotview.cpp
--- a/snapshotview.cpp
+++ b/snapshotview.cpp
@@ -11,7 +11,7 @@ SnapShotView::SnapShotView(QWidget *pare
_snapShot = snapShot;
ui->setupUi(this);
- ui->menuSnapshot->addAction(snapShot->deleteAction());
+ ui->menuSnapshot->insertAction(ui->actionClose, snapShot->deleteAction());
this->setWindowTitle(snapShot->name());
unsigned numOfChannels = snapShot->data.size();
diff --git a/snapshotview.ui b/snapshotview.ui
--- a/snapshotview.ui
+++ b/snapshotview.ui
@@ -35,6 +35,7 @@
+
@@ -70,5 +82,22 @@
-
+
+
+ actionClose
+ triggered()
+ SnapShotView
+ close()
+
+
+ -1
+ -1
+
+
+ 271
+ 224
+
+
+
+