From: <hug...@li...> - 2011-06-22 19:23:26
|
branch: details: http://hugin.hg.sourceforge.net/hgweb/hugin/hugin/hgrepo/h/hu/hugin/hugin/rev/ff7fac539804 changeset: 5345:ff7fac539804 user: tmodes date: Wed Jun 22 21:23:23 2011 +0200 description: Don't add mask to new images [800411] diffstat: src/hugin1/hugin/wxPanoCommand.cpp | 3 +++ src/hugin_base/panodata/SrcPanoImage.cpp | 6 ++++++ src/hugin_base/panodata/SrcPanoImage.h | 2 ++ 3 files changed, 11 insertions(+), 0 deletions(-) diffs (55 lines): diff -r 8c002a42cbc0 -r ff7fac539804 src/hugin1/hugin/wxPanoCommand.cpp --- a/src/hugin1/hugin/wxPanoCommand.cpp Wed Jun 22 20:50:49 2011 +0200 +++ b/src/hugin1/hugin/wxPanoCommand.cpp Wed Jun 22 21:23:23 2011 +0200 @@ -225,6 +225,7 @@ double ev = srcImg.getExposureValue(); srcImg = pano.getSrcImage(i); srcImg.setFilename(filename); + srcImg.deleteAllMasks(); // add image int imgNr = pano.addImage(srcImg); variable_groups.update(); @@ -283,6 +284,7 @@ set_exposure = true; srcImg = pano.getSrcImage(i); srcImg.setFilename(filename); + srcImg.deleteAllMasks(); srcImg.setExposureValue(ev); break; } @@ -294,6 +296,7 @@ // the file name srcImg = pano.getSrcImage(i); srcImg.setFilename(filename); + srcImg.deleteAllMasks(); break; } } diff -r 8c002a42cbc0 -r ff7fac539804 src/hugin_base/panodata/SrcPanoImage.cpp --- a/src/hugin_base/panodata/SrcPanoImage.cpp Wed Jun 22 20:50:49 2011 +0200 +++ b/src/hugin_base/panodata/SrcPanoImage.cpp Wed Jun 22 21:23:23 2011 +0200 @@ -844,6 +844,12 @@ }; }; +void SrcPanoImage::deleteAllMasks() +{ + MaskPolygonVector emptyMaskVector; + m_Masks.setData(emptyMaskVector); +}; + bool SrcPanoImage::isInsideMasks(vigra::Point2D p) const { if(!hasActiveMasks()) diff -r 8c002a42cbc0 -r ff7fac539804 src/hugin_base/panodata/SrcPanoImage.h --- a/src/hugin_base/panodata/SrcPanoImage.h Wed Jun 22 20:50:49 2011 +0200 +++ b/src/hugin_base/panodata/SrcPanoImage.h Wed Jun 22 21:23:23 2011 +0200 @@ -400,6 +400,8 @@ void changeMaskType(unsigned int index, HuginBase::MaskPolygon::MaskType newType); /** delete mask at index */ void deleteMask(unsigned int index); + /** delete all masks */ + void deleteAllMasks(); /** writes all mask lines to stream, using given image number */ void printMaskLines(std::ostream &o, unsigned int newImgNr) const; /** returns true, if point p is inside of one mask polygon */ |