Fixed some crash issues between descriptor type / nearest neighbor strategy required data type / nearest neighbor distance type.
Added selective update on objects when parameters are changed. git-svn-id: http://find-object.googlecode.com/svn/trunk/find_object@112 620bd6b2-0a58-f614-fd9a-1bd335dccda9
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// Taken from UtiLite library r185 [www.utilite.googlecode.com]
|
||||
// Taken from UtiLite library r186 [www.utilite.googlecode.com]
|
||||
|
||||
/*
|
||||
* utilite is a cross-platform library with
|
||||
@@ -296,7 +296,6 @@ void UPlotCurve::attach(UPlot * plot)
|
||||
{
|
||||
return;
|
||||
}
|
||||
this->setParent(plot);
|
||||
if(_plot)
|
||||
{
|
||||
_plot->removeCurve(this);
|
||||
@@ -1738,7 +1737,7 @@ UPlotCurve * UPlot::addCurve(const QString & curveName, const QColor & color)
|
||||
return curve;
|
||||
}
|
||||
|
||||
bool UPlot::addCurve(UPlotCurve * curve)
|
||||
bool UPlot::addCurve(UPlotCurve * curve, bool ownershipTransferred)
|
||||
{
|
||||
if(curve)
|
||||
{
|
||||
@@ -1757,7 +1756,11 @@ bool UPlot::addCurve(UPlotCurve * curve)
|
||||
|
||||
// add curve
|
||||
_curves.append(curve);
|
||||
curve->attach(this); // ownership is transferred
|
||||
curve->attach(this);
|
||||
if(ownershipTransferred)
|
||||
{
|
||||
curve->setParent(this);
|
||||
}
|
||||
this->updateAxis(curve);
|
||||
curve->setXStart(_axisMaximums[1]);
|
||||
|
||||
|
||||
+4
-6
@@ -1,4 +1,4 @@
|
||||
// Taken from UtiLite library r185 [www.utilite.googlecode.com]
|
||||
// Taken from UtiLite library r186 [www.utilite.googlecode.com]
|
||||
|
||||
/*
|
||||
* utilite is a cross-platform library with
|
||||
@@ -141,7 +141,6 @@ public:
|
||||
void setData(const std::vector<float> & y);
|
||||
void getData(QVector<float> & x, QVector<float> & y) const; // only call in Qt MainThread
|
||||
void draw(QPainter * painter);
|
||||
const QVector<float> & getMinMax() const {return _minMax;}
|
||||
|
||||
public slots:
|
||||
/**
|
||||
@@ -225,6 +224,7 @@ protected:
|
||||
void attach(UPlot * plot);
|
||||
void detach(UPlot * plot);
|
||||
void updateMinMax();
|
||||
const QVector<float> & getMinMax() const {return _minMax;}
|
||||
int removeItem(int index);
|
||||
void _addValue(UPlotItem * data);;
|
||||
virtual bool isMinMaxValid() const {return _minMax.size();}
|
||||
@@ -475,11 +475,9 @@ public:
|
||||
*/
|
||||
UPlotCurve * addCurve(const QString & curveName, const QColor & color = QColor());
|
||||
/**
|
||||
* Add a curve. Ownership is transferred to UPlot.
|
||||
* If you add the curve to more than one UPlot, the ownership is transferred
|
||||
* to the last UPlot.
|
||||
* Add a curve. Ownership is transferred to UPlot if ownershipTransferred=true.
|
||||
*/
|
||||
bool addCurve(UPlotCurve * curve);
|
||||
bool addCurve(UPlotCurve * curve, bool ownershipTransferred = true);
|
||||
/**
|
||||
* Get all curve names.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user