Fixed accumulated words bug in highest hypothesis view

This commit is contained in:
matlabbe
2016-11-27 20:55:53 -05:00
parent 3363772ce5
commit 2f6d7f81cc
3 changed files with 28 additions and 5 deletions

View File

@@ -651,8 +651,7 @@ void ImageView::updateOpacity()
void ImageView::setFeatures(const std::multimap<int, cv::KeyPoint> & refWords, const cv::Mat & depth, const QColor & color)
{
qDeleteAll(_features);
_features.clear();
clearFeatures();
float xRatio = 0;
float yRatio = 0;
@@ -684,8 +683,7 @@ void ImageView::setFeatures(const std::multimap<int, cv::KeyPoint> & refWords, c
void ImageView::setFeatures(const std::vector<cv::KeyPoint> & features, const cv::Mat & depth, const QColor & color)
{
qDeleteAll(_features);
_features.clear();
clearFeatures();
float xRatio = 0;
float yRatio = 0;
@@ -901,11 +899,21 @@ void ImageView::clearLines()
}
}
void ImageView::clear()
void ImageView::clearFeatures()
{
qDeleteAll(_features);
_features.clear();
if(!_graphicsView->isVisible())
{
this->update();
}
}
void ImageView::clear()
{
clearFeatures();
qDeleteAll(_lines);
_lines.clear();