mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-04 14:07:30 +00:00
gui: replot active mode when settings plot are updated
This commit is contained in:
parent
b7a7626e3d
commit
d6cecf2603
8 changed files with 50 additions and 2 deletions
|
|
@ -69,6 +69,12 @@ SpectrumAnalyzer::SpectrumAnalyzer(AppWindow *window)
|
|||
traceXY->setYAxis(0, TraceXYPlot::YAxisType::Magnitude, false, false, -120,0,10);
|
||||
traceXY->setYAxis(1, TraceXYPlot::YAxisType::Disabled, false, true, 0,0,1);
|
||||
|
||||
connect(this, &SpectrumAnalyzer::graphColorsChanged, [=](){
|
||||
for (auto p : TracePlot::getPlots()) {
|
||||
p->updateGraphColors();
|
||||
}
|
||||
});
|
||||
|
||||
central->setPlot(traceXY);
|
||||
|
||||
// Create menu entries and connections
|
||||
|
|
@ -960,3 +966,8 @@ void SpectrumAnalyzer::StoreSweepSettings()
|
|||
s.setValue("SAAveraging", averages);
|
||||
s.setValue("SASignalID", static_cast<bool>(settings.SignalID));
|
||||
}
|
||||
|
||||
void SpectrumAnalyzer::updateGraphColors()
|
||||
{
|
||||
emit graphColorsChanged();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,9 @@ public:
|
|||
virtual nlohmann::json toJSON() override;
|
||||
virtual void fromJSON(nlohmann::json j) override;
|
||||
|
||||
void updateGraphColors();
|
||||
|
||||
|
||||
private:
|
||||
enum class Window {
|
||||
None = 0,
|
||||
|
|
@ -117,6 +120,7 @@ signals:
|
|||
void NormalizationLevelChanged(double level);
|
||||
|
||||
void averagingChanged(unsigned int averages);
|
||||
void graphColorsChanged();
|
||||
};
|
||||
|
||||
#endif // VNA_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue