From 0a2ce9c254e5cf84531bd7ef24923956cc8d5048 Mon Sep 17 00:00:00 2001 From: Samuel Fadel Date: Thu, 11 Feb 2016 11:24:20 -0200 Subject: Scatterplot: glyph size is now a Q_PROPERTY. In addition, the updateView parameter was removed from all methods that had it. --- scatterplot.cpp | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'scatterplot.cpp') diff --git a/scatterplot.cpp b/scatterplot.cpp index 4ef266b..4c8e169 100644 --- a/scatterplot.cpp +++ b/scatterplot.cpp @@ -234,15 +234,6 @@ arma::mat Scatterplot::XY() const return m_xy; } -bool Scatterplot::saveToFile(const QUrl &url) -{ - if (!url.isLocalFile()) { - return false; - } - - return m_xy.save(url.path().toStdString(), arma::raw_ascii); -} - void Scatterplot::setXY(const arma::mat &xy) { if (xy.n_cols != 2) { @@ -329,15 +320,17 @@ void Scatterplot::autoScale() emit scaleChanged(m_sx, m_sy); } -void Scatterplot::setGlyphSize(float glyphSize, bool updateView) +void Scatterplot::setGlyphSize(float glyphSize) { + if (m_glyphSize == glyphSize || glyphSize < 2.0f) { + return; + } + m_glyphSize = glyphSize; emit glyphSizeChanged(m_glyphSize); m_shouldUpdateGeometry = true; - if (updateView) { - update(); - } + update(); } QSGNode *Scatterplot::newSceneGraph() -- cgit v1.2.3