diff options
author | bouyer <bouyer> | 2016-06-16 15:52:56 +0000 |
---|---|---|
committer | bouyer <bouyer> | 2016-06-16 15:52:56 +0000 |
commit | 772de20517e304bf353753714fab96e9c73a34c5 (patch) | |
tree | b675e15a8a94144191a4170ee947c9548a53b477 /geography/opencpn/patches/patch-plugins_grib_pi_src_GribUIDialog.cpp | |
parent | 3c81f0e66c8c50b7c52710eb23921a5693a322d2 (diff) | |
download | pkgsrc-772de20517e304bf353753714fab96e9c73a34c5.tar.gz |
Update opencpn to 4.4.0.
Changes since 4.2.0:
The 4.4.0 Release is primarily a bug-fix/maintenance update.
There is one new feature, however.
The integrated GRIB PlugIn now supports GRIB V2 format files. This update
enables some new sources for worldwide GRIB data from a variety of sources.
Diffstat (limited to 'geography/opencpn/patches/patch-plugins_grib_pi_src_GribUIDialog.cpp')
-rw-r--r-- | geography/opencpn/patches/patch-plugins_grib_pi_src_GribUIDialog.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/geography/opencpn/patches/patch-plugins_grib_pi_src_GribUIDialog.cpp b/geography/opencpn/patches/patch-plugins_grib_pi_src_GribUIDialog.cpp new file mode 100644 index 00000000000..f1b5b7bd93a --- /dev/null +++ b/geography/opencpn/patches/patch-plugins_grib_pi_src_GribUIDialog.cpp @@ -0,0 +1,35 @@ +$NetBSD: patch-plugins_grib_pi_src_GribUIDialog.cpp,v 1.1 2016/06/16 15:52:56 bouyer Exp $ + +from https://github.com/OpenCPN/OpenCPN/pull/662 +fix grib plugin timeline request from crashing when no grib file is loaded + +--- plugins/grib_pi/src/GribUIDialog.cpp.orig ++++ plugins/grib_pi/src/GribUIDialog.cpp +@@ -1251,11 +1251,14 @@ wxDateTime GRIBUICtrlBar::TimelineTime() + int tl = (m_TimeLineHours == 0) ? 0 : m_sTimeline->GetValue(); + int stepmin = m_OverlaySettings.GetMinFromIndex(m_OverlaySettings.m_SlicesPerUpdate); + return MinTime() + wxTimeSpan( tl * stepmin / 60, (tl * stepmin) % 60 ); +- } else { +- ArrayOfGribRecordSets *rsa = m_bGRIBActiveFile->GetRecordSetArrayPtr(); +- int index = m_cRecordForecast->GetCurrentSelection() < 1 ? 0 : m_cRecordForecast->GetCurrentSelection(); +- return rsa->Item(index).m_Reference_Time; + } ++ ++ ArrayOfGribRecordSets *rsa = m_bGRIBActiveFile->GetRecordSetArrayPtr(); ++ int index = m_cRecordForecast->GetCurrentSelection() < 1 ? 0 : m_cRecordForecast->GetCurrentSelection(); ++ if(rsa && index<rsa->GetCount()) ++ return rsa->Item(index).m_Reference_Time; ++ ++ return wxDateTime::Now(); + } + + wxDateTime GRIBUICtrlBar::MinTime() +@@ -1265,7 +1268,7 @@ wxDateTime GRIBUICtrlBar::MinTime() + GribRecordSet &first = rsa->Item(0); + return first.m_Reference_Time; + } +- return wxDateTime(0.0); ++ return wxDateTime::Now(); + } + + GribTimelineRecordSet* GRIBUICtrlBar::GetTimeLineRecordSet(wxDateTime time) |