From: <hug...@li...> - 2010-08-29 10:45:33
|
details: http://hugin.hg.sourceforge.net/hgweb/hugin/hugin/hgrepo/h/hu/hugin/hugin/rev/6d86c531b823 changeset: 4261:6d86c531b823 user: tmodes date: Sun Aug 29 12:45:04 2010 +0200 description: Delayed loading of layout Cause: otherwise the fast preview if activated by startup and listing to panorama changes. diffstat: src/hugin1/hugin/GLPreviewFrame.cpp | 17 ++++++++++++----- src/hugin1/hugin/GLPreviewFrame.h | 2 ++ src/hugin1/hugin/GLViewer.cpp | 1 + 3 files changed, 15 insertions(+), 5 deletions(-) diffs (51 lines): diff -r ffe61ba473b2 -r 6d86c531b823 src/hugin1/hugin/GLPreviewFrame.cpp --- a/src/hugin1/hugin/GLPreviewFrame.cpp Sun Aug 29 12:35:34 2010 +0200 +++ b/src/hugin1/hugin/GLPreviewFrame.cpp Sun Aug 29 12:45:04 2010 +0200 @@ -594,12 +594,19 @@ #endif // tell the manager to "commit" all the changes just made - wxString OpenGLLayout=config->Read(wxT("/GLPreviewFrame/OpenGLLayout")); + m_mgr->Update(); +} + +void GLPreviewFrame::LoadOpenGLLayout() +{ + PauseResize(); + wxString OpenGLLayout=wxConfig::Get()->Read(wxT("/GLPreviewFrame/OpenGLLayout")); if(!OpenGLLayout.IsEmpty()) - m_mgr->LoadPerspective(OpenGLLayout,false); - m_mgr->Update(); - -} + { + m_mgr->LoadPerspective(OpenGLLayout,true); + }; + ContinueResize(); +}; GLPreviewFrame::~GLPreviewFrame() { diff -r ffe61ba473b2 -r 6d86c531b823 src/hugin1/hugin/GLPreviewFrame.h --- a/src/hugin1/hugin/GLPreviewFrame.h Sun Aug 29 12:35:34 2010 +0200 +++ b/src/hugin1/hugin/GLPreviewFrame.h Sun Aug 29 12:45:04 2010 +0200 @@ -182,6 +182,8 @@ /** fills the blend wxChoice with all valid blend modes and restore the last used one */ void FillBlendChoice(); + /** loads the layout of the OpenGL windows and restores it */ + void LoadOpenGLLayout(); GLwxAuiManager* getAuiManager() {return m_mgr;} GLPreview* getPreview() {return m_GLPreview;} diff -r ffe61ba473b2 -r 6d86c531b823 src/hugin1/hugin/GLViewer.cpp --- a/src/hugin1/hugin/GLViewer.cpp Sun Aug 29 12:35:34 2010 +0200 +++ b/src/hugin1/hugin/GLViewer.cpp Sun Aug 29 12:45:04 2010 +0200 @@ -187,6 +187,7 @@ // we can fill it just now, because we need a OpenGL context, which was created now, // to check if all necessary extentions are available frame->FillBlendChoice(); + frame->LoadOpenGLLayout(); } void GLOverview::setUp() |