Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1466,7 +1466,7 @@ void MainWindow::zoomProfile(bool flag){
profileFv->close();
return;
}
profileFv = new QWidget(0);
profileFv = new QWidget(this, Qt::Window);
profileFv->setAttribute( Qt::WA_DeleteOnClose );
connect(profileFv,&QObject::destroyed,this, &MainWindow::restoreProfile);
QVBoxLayout *l = new QVBoxLayout();
Expand All @@ -1481,7 +1481,7 @@ void MainWindow::zoomContour(bool flag){
contourFv->close();
return;
}
contourFv = new QWidget(0);
contourFv = new QWidget(this, Qt::Window);
contourFv->setAttribute( Qt::WA_DeleteOnClose );
connect(contourFv,&QObject::destroyed,this, &MainWindow::restoreContour);
QVBoxLayout *l = new QVBoxLayout();
Expand All @@ -1494,7 +1494,7 @@ void MainWindow::zoomContour(bool flag){
void MainWindow::zoomOgl()
{

oglFv = new QWidget(0);
oglFv = new QWidget(this, Qt::Window);
oglFv->setAttribute( Qt::WA_DeleteOnClose );
connect(oglFv,&QObject::destroyed,this, &MainWindow::restoreOgl);
QVBoxLayout *l = new QVBoxLayout();
Expand Down Expand Up @@ -2026,7 +2026,8 @@ void MainWindow::on_actionSmooth_current_wave_front_triggered()
QMessageBox::warning(this, "No Wavefronts", "You must first load a wave front");
return;
}
ZernikeSmoothingDlg *dlg = new ZernikeSmoothingDlg(*sm.m_wavefronts[sm.m_currentNdx]);
ZernikeSmoothingDlg *dlg = new ZernikeSmoothingDlg(*sm.m_wavefronts[sm.m_currentNdx], this);
dlg->setAttribute(Qt::WA_DeleteOnClose);
dlg->resize(1000,1000);
dlg->show();
return;
Expand Down
2 changes: 1 addition & 1 deletion statsview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "myutils.h"
#include "utils.h"
statsView::statsView(SurfaceManager *parent) :
QDialog(0),
QDialog(qobject_cast<QWidget *>(parent ? parent->parent() : nullptr)),
ui(new Ui::statsView),m_removeOutliers(false), m_removeRMS(false)
{
ui->setupUi(this);
Expand Down
9 changes: 7 additions & 2 deletions surfacemanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1564,6 +1564,7 @@ void SurfaceManager::saveAllWaveFrontStats(){
if (m_wavefronts.size() == 0)
return;
statsView * sv = new statsView(this);
sv->setAttribute(Qt::WA_DeleteOnClose);
sv->show();
return;
}
Expand Down Expand Up @@ -2030,7 +2031,6 @@ void SurfaceManager::filter(){
}

#include "wftexaminer.h"
wftExaminer *wex;
double wrapAngle(double angle){
if (angle < -360){
angle += 360;
Expand All @@ -2040,7 +2040,12 @@ double wrapAngle(double angle){
return angle;
}
void SurfaceManager::inspectWavefront(){
wex = new wftExaminer(m_wavefronts[m_currentNdx]);
wftExaminer *wex = new wftExaminer(m_wavefronts[m_currentNdx], nullptr);
wex->setAttribute(Qt::WA_DeleteOnClose);
if (parent()) {
QObject::connect(parent(), &QObject::destroyed, wex, &QWidget::close);
}
QObject::connect(qApp, &QCoreApplication::aboutToQuit, wex, &QWidget::close);
wex->show();
}

Expand Down
1 change: 1 addition & 0 deletions wftexaminer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ wftExaminer::wftExaminer( wavefront *wf,QWidget *parent) :

wftExaminer::~wftExaminer()
{
delete m_Pl;
delete ui;
}

Expand Down
Loading