# HG changeset patch # User Hasan Yavuz Ă–ZDERYA # Date 2015-09-30 03:47:39 # Node ID 45f7246b22b1bff510601d6ffcf0b7bb70d73c19 # Parent c8ad43700b6a64f340f78735c35af84be233211d added "Close" menu item to snapshot window Note that if `delete view` is used, segfault occurs upon clicking "Close" menu 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 @@ + @@ -60,6 +61,17 @@ Rename this snapshot + + + Close + + + Close Window + + + Ctrl+W + + @@ -70,5 +82,22 @@ - + + + actionClose + triggered() + SnapShotView + close() + + + -1 + -1 + + + 271 + 224 + + + +