From: <hug...@li...> - 2012-06-10 07:59:03
|
branch: gui_overhaul details: http://hugin.hg.sourceforge.net/hgweb/hugin/hugin/hgroot/hugin/hugin/rev/3e0a9c132276 changeset: 5841:3e0a9c132276 user: tmodes date: Sun Jun 10 10:00:36 2012 +0200 description: Improved update of image tree when updating lenses or stacks diffstat: src/hugin1/hugin/ImagesTree.cpp | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diffs (22 lines): diff -r 2169ddf5e4be -r 3e0a9c132276 src/hugin1/hugin/ImagesTree.cpp --- a/src/hugin1/hugin/ImagesTree.cpp Sun Jun 10 09:47:28 2012 +0200 +++ b/src/hugin1/hugin/ImagesTree.cpp Sun Jun 10 10:00:36 2012 +0200 @@ -241,7 +241,18 @@ Freeze(); UIntSet changedImgs(changed); // Make sure the part numbers are up to date before writing them to the table. + size_t oldLensCount=m_variable_groups->getLenses().getNumberOfParts(); + size_t oldStackCount=m_variable_groups->getStacks().getNumberOfParts(); m_variable_groups->update(); + //if the number of lenses or stacks have changed we need to update all images + //because the changed images set contains only the list of the changed imagges + //but not these images where the stack or lens number has changed because + //an images has been inserted + if(m_variable_groups->getLenses().getNumberOfParts()!=oldLensCount || + m_variable_groups->getStacks().getNumberOfParts()!=oldStackCount) + { + fill_set(changedImgs, 0, pano.getNrOfImages()-1); + }; if(m_optimizerMode) { if(m_groupMode==GROUP_NONE && m_pano->getNrOfImages()>m_variable_groups->getStacks().getNumberOfParts()) |