From: <yu...@us...> - 2009-10-01 20:23:59
|
Revision: 4538 http://hugin.svn.sourceforge.net/hugin/?rev=4538&view=rev Author: yuv Date: 2009-10-01 20:23:42 +0000 (Thu, 01 Oct 2009) Log Message: ----------- apply trunk 4537 Modified Paths: -------------- hugin/releases/2009.4/src/hugin1/hugin/PanoPanel.cpp hugin/releases/2009.4/src/hugin1/hugin/PreviewCropTool.cpp Modified: hugin/releases/2009.4/src/hugin1/hugin/PanoPanel.cpp =================================================================== --- hugin/releases/2009.4/src/hugin1/hugin/PanoPanel.cpp 2009-10-01 20:20:38 UTC (rev 4537) +++ hugin/releases/2009.4/src/hugin1/hugin/PanoPanel.cpp 2009-10-01 20:23:42 UTC (rev 4538) @@ -693,6 +693,20 @@ wxLogError(_("bottom needs to be an integer bigger than 0")); return; } + // make sure that left is really to the left of right + if(left>=right) { + wxLogError(_("left boundary must be smaller than right")); + // TODO: would be nice if the previous value would be restored + return; + } + // make sure that top is really higher than bottom + if(left>=right) { + wxLogError(_("top boundary must be smaller than bottom")); + // TODO: would be nice if the previous value would be restored + return; + } + + opt.setROI(vigra::Rect2D(left, top, right, bottom)); GlobalCmdHist::getInstance().addCommand( new PT::SetPanoOptionsCmd( *pano, opt ) Modified: hugin/releases/2009.4/src/hugin1/hugin/PreviewCropTool.cpp =================================================================== --- hugin/releases/2009.4/src/hugin1/hugin/PreviewCropTool.cpp 2009-10-01 20:20:38 UTC (rev 4537) +++ hugin/releases/2009.4/src/hugin1/hugin/PreviewCropTool.cpp 2009-10-01 20:23:42 UTC (rev 4538) @@ -117,29 +117,49 @@ vigra::Rect2D roi = start_drag_options.getROI(); if (moving_left) { - unsigned int left_d = (int) (start_drag_x - x); - roi.setUpperLeft(vigra::Point2D(roi.left() - left_d, roi.top())); + if (roi.left()<roi.right()) + { + // apply the movement only if it does not bring about a negative crop + unsigned int left_d = (int) (start_drag_x - x); + roi.setUpperLeft(vigra::Point2D(roi.left() - left_d, roi.top())); + } } if (moving_top) { - unsigned int top_d = (int) (start_drag_y - y); - roi.setUpperLeft(vigra::Point2D(roi.left(), roi.top() - top_d)); + if (roi.top()<roi.bottom()) + { + // apply the movement only if it does not bring about a negative crop + unsigned int top_d = (int) (start_drag_y - y); + roi.setUpperLeft(vigra::Point2D(roi.left(), roi.top() - top_d)); + } } if (moving_right) { - unsigned int right_d = (int) (start_drag_x - x); - roi.setLowerRight(vigra::Point2D(roi.right() - right_d, - roi.bottom())); + if (roi.left()<roi.right()) + { + // apply the movement only if it does not bring about a negative crop + unsigned int right_d = (int) (start_drag_x - x); + roi.setLowerRight(vigra::Point2D(roi.right() - right_d, + roi.bottom())); + } } if (moving_bottom) { - unsigned int bottom_d = (int) (start_drag_y - y); - roi.setLowerRight(vigra::Point2D(roi.right(), - roi.bottom() - bottom_d)); + // apply the movement only if it does not bring about a negative crop + if (roi.top()<roi.bottom()) + { + unsigned int bottom_d = (int) (start_drag_y - y); + roi.setLowerRight(vigra::Point2D(roi.right(), + roi.bottom() - bottom_d)); + } } - opts.setROI(roi); - helper->GetViewStatePtr()->SetOptions(&opts); - helper->GetViewStatePtr()->Redraw(); + // apply the movement only if it does not bring about a negative crop + if((roi.top()<roi.bottom())&&(roi.left()<roi.right())) + { + opts.setROI(roi); + helper->GetViewStatePtr()->SetOptions(&opts); + helper->GetViewStatePtr()->Redraw(); + } } else { start_drag_x = x; start_drag_y = y; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yu...@us...> - 2009-10-02 00:56:50
|
Revision: 4542 http://hugin.svn.sourceforge.net/hugin/?rev=4542&view=rev Author: yuv Date: 2009-10-02 00:56:43 +0000 (Fri, 02 Oct 2009) Log Message: ----------- trunk / 4540 Modified Paths: -------------- hugin/releases/2009.4/src/hugin1/hugin/MainFrame.cpp hugin/releases/2009.4/src/hugin1/hugin/MainFrame.h Modified: hugin/releases/2009.4/src/hugin1/hugin/MainFrame.cpp =================================================================== --- hugin/releases/2009.4/src/hugin1/hugin/MainFrame.cpp 2009-10-02 00:56:10 UTC (rev 4541) +++ hugin/releases/2009.4/src/hugin1/hugin/MainFrame.cpp 2009-10-02 00:56:43 UTC (rev 4542) @@ -183,7 +183,7 @@ //WX_DEFINE_ARRAY() MainFrame::MainFrame(wxWindow* parent, Panorama & pano) - : cp_frame(0), pano(pano), m_doRestoreLayout(false), m_help(0) + : cp_frame(0), pano(pano), m_doRestoreLayout(false) { preview_frame = 0; m_progressMax = 1; @@ -1072,62 +1072,69 @@ void MainFrame::OnHelp(wxCommandEvent & e) { - DisplayHelp(wxT("contents.html")); + DisplayHelp(wxT("/Hugin.html")); } void MainFrame::OnKeyboardHelp(wxCommandEvent & e) { - DisplayHelp(wxT("Hugin_Keyboard_shortcuts.html")); + DisplayHelp(wxT("/Hugin_Keyboard_shortcuts.html")); } void MainFrame::OnFAQ(wxCommandEvent & e) { - DisplayHelp(wxT("Hugin_FAQ.html")); + DisplayHelp(wxT("/Hugin_FAQ.html")); } void MainFrame::DisplayHelp(wxString section) { + // TODO: + // structure a frame with navigation on the left and content on the right + // always load the same navigation on the left and the section into the frame + // find a way to target always the same window rather than opening new window / tabs in the browser every time + // make it look nicer with some CSS styling + + // section is the HTML document to be displayed, from inside the data folder + if(section==wxT("")){ + section = wxT("/Hugin.html"); + } + DEBUG_TRACE(""); - if (m_help == 0) +#if defined __WXMAC__ && defined MAC_SELF_CONTAINED_BUNDLE + // On Mac, xrc/data/help_LOCALE should be in the bundle as LOCALE.lproj/help + // which we can rely on the operating sytem to pick the right locale's. + wxString strFile = MacGetPathToBundledResourceFile(CFSTR("help")); + if(strFile!=wxT("")) { -#if defined __WXMAC__ && defined MAC_SELF_CONTAINED_BUNDLE - // On Mac, xrc/data/help_LOCALE should be in the bundle as LOCALE.lproj/help - // which we can rely on the operating sytem to pick the right locale's. - wxString strFile = MacGetPathToBundledResourceFile(CFSTR("help")); - if(strFile!=wxT("")) - { - strFile += wxT("/hugin.hhp"); - } else { - wxLogError(wxString::Format(wxT("Could not find help directory in the bundle"), strFile.c_str())); - return; - } + strFile += section; + } else { + wxLogError(wxString::Format(wxT("Could not find help directory in the bundle"), strFile.c_str())); + return; + } #else - // find base filename - wxString helpFile = wxT("help_") + huginApp::Get()->GetLocale().GetCanonicalName() + wxT("/hugin.hhp"); - DEBUG_INFO("help file candidate: " << helpFile.mb_str(wxConvLocal)); - //if the language is not default, load custom About file (if exists) - wxString strFile = GetXRCPath() + wxT("data/") + helpFile; - if(wxFile::Exists(strFile)) - { - DEBUG_TRACE("Using About: " << strFile.mb_str(wxConvLocal)); - } else { - // try default - strFile = GetXRCPath() + wxT("data/help_en_EN/hugin.hhp"); - } + // find base filename + wxString helpFile = wxT("help_") + huginApp::Get()->GetLocale().GetCanonicalName() + section; + DEBUG_INFO("help file candidate: " << helpFile.mb_str(wxConvLocal)); + //if the language is not default, load custom About file (if exists) + wxString strFile = GetXRCPath() + wxT("data/") + helpFile; + if(wxFile::Exists(strFile)) + { + DEBUG_TRACE("Using About: " << strFile.mb_str(wxConvLocal)); + } else { + strFile = GetXRCPath() + wxT("data/help_en_EN") + section; + } #endif - - if(!wxFile::Exists(strFile)) - { - wxLogError(wxString::Format(wxT("Could not open help file: %s"), strFile.c_str())); - return; - } - DEBUG_INFO("help file: " << strFile.mb_str(wxConvLocal)); - m_help = new wxHtmlHelpController(); - m_help->AddBook(strFile); + if(!wxFile::Exists(strFile)) + { + wxLogError(wxString::Format(wxT("Could not open help file: %s"), strFile.c_str())); + return; } - m_help->Display(section); + DEBUG_INFO("help file: " << strFile.mb_str(wxConvLocal)); + if(!wxLaunchDefaultBrowser(strFile)) + { + wxLogError(_("Can't start system's web browser")); + } } void MainFrame::OnTipOfDay(wxCommandEvent& WXUNUSED(e)) Modified: hugin/releases/2009.4/src/hugin1/hugin/MainFrame.h =================================================================== --- hugin/releases/2009.4/src/hugin1/hugin/MainFrame.h 2009-10-02 00:56:10 UTC (rev 4541) +++ hugin/releases/2009.4/src/hugin1/hugin/MainFrame.h 2009-10-02 00:56:43 UTC (rev 4542) @@ -231,9 +231,6 @@ // self static MainFrame* m_this; - // the help browser - wxHtmlHelpController * m_help; - // progress reporter double m_progressMax; double m_progress; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yu...@us...> - 2009-10-11 18:59:28
|
Revision: 4606 http://hugin.svn.sourceforge.net/hugin/?rev=4606&view=rev Author: yuv Date: 2009-10-11 18:59:10 +0000 (Sun, 11 Oct 2009) Log Message: ----------- trunk / 4602 Modified Paths: -------------- hugin/releases/2009.4/src/hugin1/hugin/PreviewTool.cpp hugin/releases/2009.4/src/hugin1/hugin/PreviewTool.h Modified: hugin/releases/2009.4/src/hugin1/hugin/PreviewTool.cpp =================================================================== --- hugin/releases/2009.4/src/hugin1/hugin/PreviewTool.cpp 2009-10-11 18:57:58 UTC (rev 4605) +++ hugin/releases/2009.4/src/hugin1/hugin/PreviewTool.cpp 2009-10-11 18:59:10 UTC (rev 4606) @@ -28,3 +28,7 @@ helper = helper_in; } +PreviewTool::~PreviewTool() +{ +} + Modified: hugin/releases/2009.4/src/hugin1/hugin/PreviewTool.h =================================================================== --- hugin/releases/2009.4/src/hugin1/hugin/PreviewTool.h 2009-10-11 18:57:58 UTC (rev 4605) +++ hugin/releases/2009.4/src/hugin1/hugin/PreviewTool.h 2009-10-11 18:59:10 UTC (rev 4606) @@ -38,6 +38,8 @@ public: // when inhereting, please use this: PreviewTool(PreviewToolHelper *helper); + + virtual ~PreviewTool(); // Lots of stub functions here. Your tools should override a few of them. /* When the user switches on the tool, Activate is called. We should This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yu...@us...> - 2009-10-25 00:11:57
|
Revision: 4671 http://hugin.svn.sourceforge.net/hugin/?rev=4671&view=rev Author: yuv Date: 2009-10-25 00:11:48 +0000 (Sun, 25 Oct 2009) Log Message: ----------- applying trunk/4654 Modified Paths: -------------- hugin/releases/2009.4/src/hugin1/hugin/hugin.desktop hugin/releases/2009.4/src/hugin1/hugin/xrc/data/about.htm.in Modified: hugin/releases/2009.4/src/hugin1/hugin/hugin.desktop =================================================================== --- hugin/releases/2009.4/src/hugin1/hugin/hugin.desktop 2009-10-25 00:11:44 UTC (rev 4670) +++ hugin/releases/2009.4/src/hugin1/hugin/hugin.desktop 2009-10-25 00:11:48 UTC (rev 4671) @@ -1,5 +1,5 @@ [Desktop Entry] -Name=Hugin panorama creator +Name=Hugin Panorama Creator Name[cs]=Hugin pro skládání panoramat Name[de]=Hugin - Panorama-Editor Name[fr]=Hugin - Créateur de panoramas Modified: hugin/releases/2009.4/src/hugin1/hugin/xrc/data/about.htm.in =================================================================== --- hugin/releases/2009.4/src/hugin1/hugin/xrc/data/about.htm.in 2009-10-25 00:11:44 UTC (rev 4670) +++ hugin/releases/2009.4/src/hugin1/hugin/xrc/data/about.htm.in 2009-10-25 00:11:48 UTC (rev 4671) @@ -6,7 +6,7 @@ <center> <img src="splash.png"></img> <p> - <font size=+2>hugin</font><br> + <font size=+2>Hugin</font><br> Version ${DISPLAY_VERSION} <br> <font size=-1>(http://hugin.sourceforge.net)</font> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bru...@us...> - 2009-11-30 21:51:18
|
Revision: 4729 http://hugin.svn.sourceforge.net/hugin/?rev=4729&view=rev Author: brunopostle Date: 2009-11-30 21:51:06 +0000 (Mon, 30 Nov 2009) Log Message: ----------- merge trunk/4702 (Gerry Patterson) [2888839] - Fix for display of obsolete images. Now a blank checkerboard is displayed if an image is not selected in the list. Modified Paths: -------------- hugin/releases/2009.4/src/hugin1/hugin/CropPanel.cpp Added Paths: ----------- hugin/releases/2009.4/src/hugin1/hugin/xrc/data/transparent.png Modified: hugin/releases/2009.4/src/hugin1/hugin/CropPanel.cpp =================================================================== --- hugin/releases/2009.4/src/hugin1/hugin/CropPanel.cpp 2009-11-30 20:48:41 UTC (rev 4728) +++ hugin/releases/2009.4/src/hugin1/hugin/CropPanel.cpp 2009-11-30 21:51:06 UTC (rev 4729) @@ -88,7 +88,7 @@ DEBUG_ASSERT(m_imagesList); m_Canvas = XRCCTRL(*this, "crop_edit_unknown", CenterCanvas); - DEBUG_ASSERT(m_imagesList); + DEBUG_ASSERT(m_Canvas); // get all other widgets @@ -159,11 +159,24 @@ void CropPanel::panoramaImagesChanged (PT::Panorama &pano, const PT::UIntSet & imgNrs) { + // Ensure the list has been updated before processing + m_imagesList->panoramaImagesChanged(pano,imgNrs); + m_selectedImages = m_imagesList->GetSelected(); + if (m_selectedImages.size() > 0) { int imgNr = *(m_selectedImages.begin()); if (set_contains(imgNrs, imgNr )) { Pano2Display(imgNr); } + } else { + wxString tmpStr = huginApp::Get()->GetXRCPath() + wxT("data/") + + wxT("transparent.png"); + std::string transparent = std::string(tmpStr.mb_str()); + ImageCache::EntryPtr imgV = + ImageCache::getInstance().getImage(transparent); + m_Canvas->SetImage(imgV); + m_currentImageFile == transparent ; + UpdateDisplay(); } } @@ -196,7 +209,6 @@ { // set crop image options. vector<ImageOptions> opts; - m_selectedImages = m_imagesList->GetSelected(); for (UIntSet::iterator it = m_selectedImages.begin(); it != m_selectedImages.end(); ++it) { Copied: hugin/releases/2009.4/src/hugin1/hugin/xrc/data/transparent.png (from rev 4702, hugin/trunk/src/hugin1/hugin/xrc/data/transparent.png) =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |