File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1615,6 +1615,37 @@ const String EditorViewport::loadState (File fileToLoad)
16151615 return " Not a valid file." ;
16161616 }
16171617
1618+ if (auto * element = xml->getChildByName (" INFO" ))
1619+ {
1620+ for (auto * child : element->getChildIterator ())
1621+ {
1622+ if (child->hasTagName (" VERSION" ))
1623+ {
1624+ String savedVersion = child->getAllSubText ();
1625+ String minimumVersion = " 1.0.0" ;
1626+
1627+ if (savedVersion.compareNatural (minimumVersion) < 0 )
1628+ {
1629+ bool userResponse = AlertWindow::showOkCancelBox (AlertWindow::WarningIcon,
1630+ " Incompatible Configuration File" ,
1631+ " This configuration file was created using a version of Open Ephys GUI older than 1.0.0. "
1632+ " Some settings and parmeters may not load correctly.\n\n "
1633+ " Would you like to proceed with loading the configuration file?" ,
1634+ " Yes" ,
1635+ " No" );
1636+
1637+ if (! userResponse)
1638+ {
1639+ LOGC (" Cancelled loading configuration file." );
1640+ return " Cancelled loading configuration file." ;
1641+ }
1642+ }
1643+
1644+ break ;
1645+ }
1646+ }
1647+ }
1648+
16181649 AccessClass::getProcessorGraph ()->getUndoManager ()->beginNewTransaction (" Disabled during acquisition" );
16191650
16201651 LoadSignalChain* action = new LoadSignalChain (xml);
You can’t perform that action at this time.
0 commit comments