diff --git a/GUI/View/Plotter/ColorMap.cpp b/GUI/View/Plotter/ColorMap.cpp index 975791b7b1e8b2d4e7d628673a026bc2880a75a1..1d7ab1d74d49905ffdc5ef15b067ccb57c1f2594 100644 --- a/GUI/View/Plotter/ColorMap.cpp +++ b/GUI/View/Plotter/ColorMap.cpp @@ -129,7 +129,6 @@ void ColorMap::itemToMap(Data2DItem* item) setAxesRangeConnected(true); setDataRangeConnected(true); - setUpdateTimerConnected(true); } QString ColorMap::infoString(const QPointF& pos) const diff --git a/GUI/View/Plotter/ScientificPlot.cpp b/GUI/View/Plotter/ScientificPlot.cpp index e3f6d21cb72bf73e2b7b6341c1b8617988a0be75..10b920da09ba77da530c0b59383427514e8f2253 100644 --- a/GUI/View/Plotter/ScientificPlot.cpp +++ b/GUI/View/Plotter/ScientificPlot.cpp @@ -13,14 +13,12 @@ // ************************************************************************************************ #include "GUI/View/Plotter/ScientificPlot.h" -#include "GUI/Support/Thread/UpdateTimer.h" #include "GUI/View/Plotter/PlotEventHelper.h" #include <QEvent> #include <qcustomplot.h> ScientificPlot::ScientificPlot(PLOT_TYPE plot_type) : m_qcp(new QCustomPlot) - , m_update_timer(new UpdateTimer(10, this)) , m_plot_type(plot_type) , m_event_helper(new PlotEventHelper(this)) { @@ -75,22 +73,7 @@ qreal ScientificPlot::fromSceneY(qreal p) const return m_qcp->yAxis->pixelToCoord(p); } -void ScientificPlot::setUpdateTimerConnected(bool isConnected) -{ - if (isConnected) - connect(m_update_timer, &UpdateTimer::timeToUpdate, this, &ScientificPlot::onTimeToReplot, - Qt::UniqueConnection); - else - disconnect(m_update_timer, &UpdateTimer::timeToUpdate, this, - &ScientificPlot::onTimeToReplot); -} - void ScientificPlot::replot() { - m_update_timer->scheduleUpdate(); -} - -void ScientificPlot::onTimeToReplot() -{ - m_qcp->replot(); + m_qcp->replot(QCustomPlot::rpQueuedReplot); } diff --git a/GUI/View/Plotter/ScientificPlot.h b/GUI/View/Plotter/ScientificPlot.h index 49414373fa188161bb87c56d2cf1b734a5a11e8f..fa8b79b03f445faac173922eb80a19b9f76b8266 100644 --- a/GUI/View/Plotter/ScientificPlot.h +++ b/GUI/View/Plotter/ScientificPlot.h @@ -19,7 +19,6 @@ class PlotEventHelper; class QCustomPlot; -class UpdateTimer; //! Common interface for plot-descriptor interaction @@ -59,7 +58,6 @@ signals: void statusString(const QString& text); protected: - void setUpdateTimerConnected(bool isConnected); void replot(); QCustomPlot* m_qcp; @@ -69,7 +67,6 @@ private: void onTimeToReplot(); - UpdateTimer* m_update_timer; PLOT_TYPE m_plot_type; PlotEventHelper* m_event_helper; }; diff --git a/GUI/View/Plotter/SpecularPlot.cpp b/GUI/View/Plotter/SpecularPlot.cpp index 0cf7a02d2fb0d6fe1c7137d90f4d38d7e7b8cc29..03203d813d829d334aec97d68a453364343d2ebe 100644 --- a/GUI/View/Plotter/SpecularPlot.cpp +++ b/GUI/View/Plotter/SpecularPlot.cpp @@ -180,7 +180,6 @@ void SpecularPlot::initPlot() void SpecularPlot::setConnected(bool isConnected) { setAxesRangeConnected(isConnected); - setUpdateTimerConnected(isConnected); } void SpecularPlot::setAxesRangeConnected(bool isConnected)