diff --git a/Library/MeterWindow.cpp b/Library/MeterWindow.cpp index 8df67f0c..6bf3bf3f 100644 --- a/Library/MeterWindow.cpp +++ b/Library/MeterWindow.cpp @@ -2181,9 +2181,6 @@ bool CMeterWindow::ReadSkin() { CMeter* meter = *iter; m_Meters.push_back(meter); - - meter->ReadOptions(m_Parser); - meter->Initialize(); meter->SetRelativeMeter(prevMeter); if (!meter->GetToolTipText().empty()) @@ -2199,8 +2196,8 @@ bool CMeterWindow::ReadSkin() prevMeter = meter; } - // Initialize measures. This is a separate loop to avoid errors caused by - // referencing not-yet-existent [measures] in the options. + // Initialize measures. Separate loop to avoid errors caused by + // referencing nonexistent [measures] in the measure options. for (auto iter = measures.cbegin(); iter != measures.cend(); ++iter) { CMeasure* measure = *iter; @@ -2208,6 +2205,15 @@ bool CMeterWindow::ReadSkin() measure->Initialize(); } + // Initialize meters. Separate loop to avoid errors caused by referencing + // nonexistent [Measures:] in the meter options. (Dynamic Section Variables) + for (auto iter = meters.cbegin(); iter != meters.cend(); ++iter) + { + CMeter* meter = *iter; + meter->ReadOptions(m_Parser); + meter->Initialize(); + } + if (m_Meters.empty()) { std::wstring text = GetFormattedString(ID_STR_NOMETERSINSKIN, m_FolderPath.c_str(), m_FileName.c_str());