Skip to content

Commit 490ca96

Browse files
multi-grib support
1 parent 63ac4a6 commit 490ca96

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

plugins/grib_pi/src/GribUIDialog.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ void GRIBUICtrlBar::OpenFile(bool newestFile) {
478478

479479
ArrayOfGribRecordSets *rsa = m_bGRIBActiveFile->GetRecordSetArrayPtr();
480480
wxString title;
481-
if (m_bGRIBActiveFile->IsOK()) {
481+
if (GetGribLayerManager()->IsOK()) {
482482
wxFileName fn(m_bGRIBActiveFile->GetFileNames()[0]);
483483
title = (_("File: "));
484484
title.Append(fn.GetFullName());
@@ -1357,7 +1357,7 @@ void GRIBUICtrlBar::StopPlayBack() {
13571357
}
13581358

13591359
void GRIBUICtrlBar::TimelineChanged() {
1360-
if (!m_bGRIBActiveFile || (m_bGRIBActiveFile && !m_bGRIBActiveFile->IsOK())) {
1360+
if (!m_bGRIBActiveFile || !GetGribLayerManager()->IsOK()) {
13611361
pPlugIn->GetGRIBOverlayFactory()->SetGribTimelineRecordSet(nullptr);
13621362
return;
13631363
}
@@ -1920,7 +1920,7 @@ void GRIBUICtrlBar::OnNext(wxCommandEvent &event) {
19201920
}
19211921

19221922
void GRIBUICtrlBar::ComputeBestForecastForNow() {
1923-
if (!m_bGRIBActiveFile || (m_bGRIBActiveFile && !m_bGRIBActiveFile->IsOK())) {
1923+
if (!m_bGRIBActiveFile || (m_bGRIBActiveFile && !GetGribLayerManager()->IsOK())) {
19241924
pPlugIn->GetGRIBOverlayFactory()->SetGribTimelineRecordSet(nullptr);
19251925
return;
19261926
}
@@ -1983,7 +1983,7 @@ void GRIBUICtrlBar::SetTimeLineMax(bool SetValue) {
19831983
m_OverlaySettings.GetMinFromIndex(m_OverlaySettings.m_SlicesPerUpdate);
19841984
m_sTimeline->SetMax(m_TimeLineHours * 60 / stepmin);
19851985
} else {
1986-
if (m_bGRIBActiveFile && m_bGRIBActiveFile->IsOK()) {
1986+
if (GetGribLayerManager()->IsOK()) {
19871987
ArrayOfGribRecordSets *rsa = m_bGRIBActiveFile->GetRecordSetArrayPtr();
19881988
m_sTimeline->SetMax(rsa->GetCount() - 1);
19891989
}

plugins/grib_pi/src/grib_layer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ GribLayer::GribLayer() : m_bEnabled(false), m_pGribFile(nullptr) {}
3131
GribLayer::~GribLayer() { Clear(); }
3232

3333
bool GribLayer::IsOK() const {
34-
return m_pGribFile && m_pGribFile->IsOK();
34+
return m_bEnabled && m_pGribFile && m_pGribFile->IsOK();
3535
}
3636

3737
void GribLayer::Assign(GRIBFile* file) {

0 commit comments

Comments
 (0)