← Back to team overview

hugin-devs team mailing list archive

[Bug 733793] Re: About window crashes on OSX for 2011.0 beta versions

 

** Changed in: hugin
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Hugin
Developers, which is subscribed to Hugin.
https://bugs.launchpad.net/bugs/733793

Title:
  About window crashes on OSX  for 2011.0 beta versions

Status in Hugin - Panorama Tools GUI:
  Fix Released

Bug description:
  The aboutdialog.cpp crashes hugin in the 2011 branch. The aboutdialog
  in the trunk works correctly.

  This is due to the fact that the aboutdialog.cpp within the 2011.0 (beta) branch is different from the trunk one.
  I have already been fiddling with the code the past couple of days but I'm obviously an even worse programmer than I expected to be as I can't repair it.

  Can this please be fixed?

  The trunk contains the code (This functions!):
  =====================================
  void AboutDialog::SetMode(int newMode)
  {
      if(m_mode==newMode){
          return;
      }
      if((newMode!=6)&&(m_mode!=6)){
          m_mode=newMode;
          return;
      }
      // image to be displayed on dedication tab
      if(newMode==6){
          m_logo.LoadFile(huginApp::Get()->GetXRCPath() +
                          wxT("data/") + wxT("logo.png"),
                          wxBITMAP_TYPE_PNG);
          m_logoImgCtrl->SetBitmap(m_logo);
          m_mode=newMode;
          return;
      }
      // image to be displayed on any other tab
      if(m_mode==6){
          m_logo.LoadFile(huginApp::Get()->GetXRCPath() +
                          wxT("data/") + wxT("logo.png"),
                          wxBITMAP_TYPE_PNG);
          m_logoImgCtrl->SetBitmap(m_logo);
          m_mode=newMode;
          return;
      }
  };
  =====================================

  
  The 2011.0 branch contains the code (This crashes hugin!):
  =====================================
  void AboutDialog::SetMode(int newMode)
  {
      if(m_mode==newMode){
          return;
      }

      switch ( newMode ) {

          case 0 :
              // about tab
  			wxString strFile = MacGetPathToBundledResourceFile(CFSTR("splash.png"));
  			SetLogo(wxT(strFile));
              break;

          case 6 :
              // dedication tab
  			strFile = MacGetPathToBundledResourceFile(CFSTR("dedication.png"));
  			SetLogo(wxT(strFile));
              break;

          default :
              // all other tabs
  			strFile = MacGetPathToBundledResourceFile(CFSTR("logo.png"));
  			SetLogo(wxT(strFile));

      }

      m_mode=newMode;
      return;
  };
  =====================================



References