diff --git a/GUI/View/Plotter/PlotStatusLabel.cpp b/GUI/View/Plotter/PlotStatusLabel.cpp index daa026f2516103653745320db46f6b2a67640937..b8794e905f6b04eaebe73353cc1002f27fc765f6 100644 --- a/GUI/View/Plotter/PlotStatusLabel.cpp +++ b/GUI/View/Plotter/PlotStatusLabel.cpp @@ -96,11 +96,6 @@ void PlotStatusLabel::setLabelEnabled(bool flag) setEnabled(flag); } -void PlotStatusLabel::onPlotStatusString(const QString& text) -{ - setText(text); -} - //! Enables/disables showing of label for given plot. void PlotStatusLabel::setPlotLabelEnabled(ScientificPlot* plot, bool flag) { @@ -112,12 +107,12 @@ void PlotStatusLabel::setPlotLabelEnabled(ScientificPlot* plot, bool flag) void PlotStatusLabel::setConnected(ScientificPlot* plot, bool flag) const { if (flag) { - connect(plot, &ScientificPlot::statusString, this, &PlotStatusLabel::onPlotStatusString, + connect(plot, &ScientificPlot::statusString, this, &PlotStatusLabel::setText, Qt::UniqueConnection); connect(plot, &ScientificPlot::destroyed, this, &PlotStatusLabel::onPlotDestroyed, Qt::UniqueConnection); } else { - disconnect(plot, &ScientificPlot::statusString, this, &PlotStatusLabel::onPlotStatusString); + disconnect(plot, &ScientificPlot::statusString, this, &PlotStatusLabel::setText); } } diff --git a/GUI/View/Plotter/PlotStatusLabel.h b/GUI/View/Plotter/PlotStatusLabel.h index 3029361264d4fe642946ee535277168fb53f9991..9696a3472bcadceb32c5bbcf49220d53429aca7f 100644 --- a/GUI/View/Plotter/PlotStatusLabel.h +++ b/GUI/View/Plotter/PlotStatusLabel.h @@ -35,15 +35,11 @@ public: void addPlot(ScientificPlot* plot); void setPlot(ScientificPlot* plot); - void setText(const QString& text); - void setLabelEnabled(bool flag); -public slots: - void onPlotStatusString(const QString& text); - private slots: void onPlotDestroyed(QObject* obj); + void setText(const QString& text); private: void paintEvent(QPaintEvent* event) override;