From: <hug...@li...> - 2013-03-23 08:08:14
|
branch: details: http://hugin.hg.sourceforge.net/hgweb/hugin/hugin/hgroot/hugin/hugin/rev/d7ac16a9c04f changeset: 6231:d7ac16a9c04f user: tmodes date: Sat Mar 23 08:58:46 2013 +0100 description: During loading check if stacks are consistent linked Implemented as check during load and to get correctly linked Tpy and Tpp when loading older projects diffstat: src/hugin_base/panodata/Panorama.cpp | 26 ++++++++++++++++++++++++++ 1 files changed, 26 insertions(+), 0 deletions(-) diffs (36 lines): diff -r 95841e15019e -r d7ac16a9c04f src/hugin_base/panodata/Panorama.cpp --- a/src/hugin_base/panodata/Panorama.cpp Thu Mar 21 17:41:44 2013 +0100 +++ b/src/hugin_base/panodata/Panorama.cpp Sat Mar 23 08:58:46 2013 +0100 @@ -2948,6 +2948,32 @@ #undef image_variable new_img.setProjection((SrcPanoImage::Projection) iImgInfo[i].f); + // check, if stacks are correctly linked +#define check_stack_link(name) \ + if(!new_img.YawisLinked() && new_img.name##isLinked())\ + {\ + new_img.unlink##name();\ + };\ + if(new_img.YawisLinked() && !new_img.name##isLinked())\ + {\ + for(size_t j=0; j<i; j++)\ + {\ + if(new_img.YawisLinkedWith(*images[j]))\ + {\ + new_img.link##name(images[j]);\ + break;\ + };\ + };\ + } + check_stack_link(Pitch); + check_stack_link(Roll); + check_stack_link(X); + check_stack_link(Y); + check_stack_link(Z); + check_stack_link(TranslationPlaneYaw); + check_stack_link(TranslationPlanePitch); +#undef check_stack_link + #if 0 new_img.setFeatherWidth((unsigned int) iImgInfo[i].blend_radius); #endif |