head 1.2; access; symbols pkgsrc-2017Q1:1.1.0.8 pkgsrc-2017Q1-base:1.1 pkgsrc-2016Q4:1.1.0.6 pkgsrc-2016Q4-base:1.1 pkgsrc-2016Q3:1.1.0.4 pkgsrc-2016Q3-base:1.1 pkgsrc-2016Q2:1.1.0.2 pkgsrc-2016Q2-base:1.1; locks; strict; comment @// @; 1.2 date 2017.04.14.16.20.15; author bouyer; state dead; branches; next 1.1; commitid MQ2TWmvVlthpiwNz; 1.1 date 2016.06.16.15.52.56; author bouyer; state Exp; branches; next ; commitid BYojaSVtPXKJQHaz; desc @@ 1.2 log @Update opencpn to 4.6.1. Changes since 4.4.0: As a successor to OpenCPN version 4.4, OpenCPN Version 4.6 contains several new features and enhanced functions. Among them are: Substantial functional improvements and performance increases related to ENC vector charts. User selectable InlandECS mode for increased safety and convenience while navigating inland waters. Expanded User Manual bundled with Release download. @ text @$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 && indexGetCount()) + 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) @ 1.1 log @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. @ text @d1 1 a1 1 $NetBSD: $ @