From 41bcd4559d0ed0bb86d75071ea3e45133c9c7143 Mon Sep 17 00:00:00 2001 From: gr5 Date: Fri, 23 Oct 2026 13:06:25 -0400 Subject: [PATCH] Fixes bug where some of the buttons on bottom right of DFTFringe (rotate, average, invert, updated selected wavefronts) were not updating the +/- checkboxes in zernike I just got rid of all the flags that said if they should be updated and they are now always updated inside SurfaceManager::generateSurfacefromWavefront() --- surfacemanager.cpp | 16 ++++------------ surfacemanager.h | 2 -- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/surfacemanager.cpp b/surfacemanager.cpp index 6caf6c87..bb385909 100644 --- a/surfacemanager.cpp +++ b/surfacemanager.cpp @@ -349,12 +349,10 @@ void SurfaceManager::generateSurfacefromWavefront(int wavefrontNdx) { void SurfaceManager::generateSurfacefromWavefront(wavefront * wf){ zernikeProcess &zp = *zernikeProcess::get_Instance(); - if (wf->zernEnablesApplied.empty()) { - wf->zernEnablesApplied = zernEnables; - } else if (wf->zernEnablesApplied.size() != zernEnables.size()) { + if (wf->zernEnablesApplied.size() != zernEnables.size()) { wf->zernEnablesApplied.resize(zernEnables.size(), true); } - + wf->zernEnablesApplied = zernEnables; wf->gbEnabled = m_GB_enabled; wf->gbValue = m_gbValue; @@ -543,7 +541,7 @@ SurfaceManager::SurfaceManager(QObject *parent, surfaceAnalysisTools *tools, m_surfaceTools(tools),m_profilePlot(profilePlot), m_contourView(contourView), m_SurfaceGraph(glPlot), m_metrics(mets),m_gbValue(21), m_GB_enabled(false),m_currentNdx(-1),m_standAvg(0),insideOffset(0),outsideOffset(0), - m_inverseMode(invNOTSET),m_ignoreInverse(false), m_standAstigWizard(nullptr), workToDo(0), m_applyFloatingZernEnables(false), m_wftStats(0) + m_inverseMode(invNOTSET),m_ignoreInverse(false), m_standAstigWizard(nullptr), workToDo(0), m_wftStats(0) { m_simView = SimulationsView::getInstance(0); @@ -1002,7 +1000,6 @@ void SurfaceManager::computeZerns() { QList doThese = m_surfaceTools->SelectedWaveFronts(); workToDo = doThese.size(); - m_applyFloatingZernEnables = !doThese.isEmpty(); mirrorDlg &md = *mirrorDlg::get_Instance(); foreach(int ndx , doThese){ wavefront &wf = *m_wavefronts[ndx]; @@ -1691,13 +1688,8 @@ void SurfaceManager::backGroundUpdate(){ workToDo = doThese.size(); pd->setLabelText("Updating Selected Surfaces"); pd->setRange(0,doThese.size()); - const bool applyFloatingZerns = m_applyFloatingZernEnables; - m_applyFloatingZernEnables = false; foreach (int i, doThese){ -qDebug() << "updating these" << doThese << i << ++cnt; - if (applyFloatingZerns) { - m_wavefronts[i]->zernEnablesApplied = zernEnables; - } + qDebug() << "updating these" << doThese << i << ++cnt; m_wavefronts[i]->dirtyZerns = true; m_wavefronts[i]->wasSmoothed = false; makeMask(i); diff --git a/surfacemanager.h b/surfacemanager.h index b57627e0..1777390f 100644 --- a/surfacemanager.h +++ b/surfacemanager.h @@ -132,8 +132,6 @@ class SurfaceManager : public QObject QPointer m_standAstigWizard; int workToDo; int workProgress; - bool m_applyFloatingZernEnables; - wftStats *m_wftStats; explicit SurfaceManager(QObject *parent=0, surfaceAnalysisTools *tools = 0, ProfilePlot *profilePlot =0,