From: <hug...@li...> - 2012-05-08 16:54:50
|
branch: gui_overhaul details: http://hugin.hg.sourceforge.net/hgweb/hugin/hugin/hgroot/hugin/hugin/rev/66096cb26408 changeset: 5779:66096cb26408 user: tmodes date: Tue May 08 18:55:50 2012 +0200 description: Correctly update image tree when showing output layer or stacks Also show d/e in beginner mode diffstat: src/hugin1/hugin/GuiLevel.cpp | 2 +- src/hugin1/hugin/ImagesTree.cpp | 18 ++++++++++++------ src/hugin1/hugin/ImagesTree.h | 2 ++ 3 files changed, 15 insertions(+), 7 deletions(-) diffs (83 lines): diff -r 7f384d763667 -r 66096cb26408 src/hugin1/hugin/GuiLevel.cpp --- a/src/hugin1/hugin/GuiLevel.cpp Tue May 08 18:54:56 2012 +0200 +++ b/src/hugin1/hugin/GuiLevel.cpp Tue May 08 18:55:50 2012 +0200 @@ -46,7 +46,7 @@ for(size_t i=0;i<pano.getNrOfImages();i++) { const HuginBase::SrcPanoImage& img=pano.getImage(i); - if(img.getRadialDistortionCenterShift().squareLength()>0 || img.getRadialVigCorrCenterShift().squareLength()>0) + if(img.getRadialVigCorrCenterShift().squareLength()>0) { return GUI_ADVANCED; }; diff -r 7f384d763667 -r 66096cb26408 src/hugin1/hugin/ImagesTree.cpp --- a/src/hugin1/hugin/ImagesTree.cpp Tue May 08 18:54:56 2012 +0200 +++ b/src/hugin1/hugin/ImagesTree.cpp Tue May 08 18:55:50 2012 +0200 @@ -100,6 +100,7 @@ m_dragging=false; m_displayMode=DISPLAY_GENERAL; m_optimizerMode=false; + m_needsUpdate=true; } bool ImagesTreeCtrl::Create(wxWindow* parent, wxWindowID id, @@ -231,6 +232,13 @@ UpdateOptimizerVariables(); Thaw(); }; + if(m_needsUpdate && (m_groupMode==GROUP_OUTPUTLAYERS || m_groupMode==GROUP_OUTPUTSTACK)) + { + UIntSet imgs; + fill_set(imgs, 0, pano.getNrOfImages()-1); + panoramaImagesChanged(pano, imgs); + }; + m_needsUpdate=true; }; void ImagesTreeCtrl::panoramaImagesChanged(Panorama &pano, const UIntSet &changed) @@ -288,9 +296,11 @@ break; case GROUP_OUTPUTSTACK: imageGroups=getHDRStacks(*m_pano,m_pano->getActiveImages()); + m_needsUpdate=false; break; case GROUP_OUTPUTLAYERS: imageGroups=getExposureLayers(*m_pano,m_pano->getActiveImages()); + m_needsUpdate=false; break; }; @@ -326,10 +336,6 @@ }; }; - if(m_optimizerMode) - { - UpdateOptimizerVariables(); - }; Thaw(); // HACK! need to notify clients anyway... send dummy event.. @@ -1032,8 +1038,8 @@ SetColumnShown(m_columnMap["a"], m_displayMode==DISPLAY_LENS); SetColumnShown(m_columnMap["b"], m_displayMode==DISPLAY_LENS); SetColumnShown(m_columnMap["c"], m_displayMode==DISPLAY_LENS); - SetColumnShown(m_columnMap["d"], m_displayMode==DISPLAY_LENS && m_guiLevel>=GUI_ADVANCED); - SetColumnShown(m_columnMap["e"], m_displayMode==DISPLAY_LENS && m_guiLevel>=GUI_ADVANCED); + SetColumnShown(m_columnMap["d"], m_displayMode==DISPLAY_LENS); + SetColumnShown(m_columnMap["e"], m_displayMode==DISPLAY_LENS); SetColumnShown(m_columnMap["g"], m_displayMode==DISPLAY_LENS && m_guiLevel>=GUI_EXPERT); SetColumnShown(m_columnMap["t"], m_displayMode==DISPLAY_LENS && m_guiLevel>=GUI_EXPERT); diff -r 7f384d763667 -r 66096cb26408 src/hugin1/hugin/ImagesTree.h --- a/src/hugin1/hugin/ImagesTree.h Tue May 08 18:54:56 2012 +0200 +++ b/src/hugin1/hugin/ImagesTree.h Tue May 08 18:55:50 2012 +0200 @@ -188,6 +188,8 @@ double m_editVal; /** wxString, as shown before editing started */ wxString m_editOldString; + /** helper variable for update of output stacks/layers */ + bool m_needsUpdate; /** pointer to root item, not shown */ wxTreeItemId m_root; |