Skip to content

Commit e628953

Browse files
authored
Merge pull request #327 from githubdoe/averageProfile
When creating a wavefront based on the average profile, it adds "_avg" to the wavefront name
2 parents 034609d + c487374 commit e628953

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

profilecurve.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
#include <qpainter.h>
55
#include <qpainterpath.h>
66
#include <qwt_scale_map.h>
7+
#include <qpainter.h>
8+
79

810
// creates a curve of the profile and will highlight segments where the slope is violated if the user has that feature enabled.
911
// uses the base class for most of the work. Overrides the actual painting of the line.
@@ -24,10 +26,7 @@ void ProfileCurve::setSlopeSettings(bool show, double limit, int highlightWidth)
2426
m_highlightWidth = highlightWidth;
2527
}
2628

27-
#include <QPainterPath> // Ensure this is at the top of profilecurve.cpp
2829

29-
#include <qwt_scale_map.h>
30-
#include <qpainter.h>
3130

3231
void ProfileCurve::drawLines(QPainter *painter,
3332
const QwtScaleMap &xMap,

profileplot.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ qDebug() << "Populate";
710710
y_offset = m_waveFrontyOffsets[name];
711711
else if (m_waveFrontyOffsets.contains(name + " avg")){
712712
y_offset = m_waveFrontyOffsets[name + " avg"];
713-
qDebug() << "using avg";
713+
714714
}
715715

716716
// if show one angle
@@ -1171,5 +1171,5 @@ void ProfilePlot::CreateWaveFrontFromAverage(){
11711171
sm->createSurfaceFromPhaseMap(result,
11721172
m_wf->m_outside,
11731173
m_wf->m_inside,
1174-
QString("avg"), WavefrontOrigin::Average);
1174+
QString(m_wf->name.replace(".wft","") + "_avg"), WavefrontOrigin::Average);
11751175
}

0 commit comments

Comments
 (0)