1.1 --- a/xml-vym.cpp Mon Oct 06 11:10:20 2008 +0000
1.2 +++ b/xml-vym.cpp Wed Oct 29 17:42:34 2008 +0000
1.3 @@ -47,25 +47,6 @@
1.4 {
1.5 state = StateMap;
1.6
1.7 - if (loadMode==NewMap)
1.8 - model->clear(); // remove existing mapCenter
1.9 -
1.10 - // Check version
1.11 - if (!atts.value( "version").isEmpty() )
1.12 - {
1.13 - if (!checkVersion(atts.value("version")))
1.14 - QMessageBox::warning( 0, "Warning: Version Problem" ,
1.15 - "<h3>Map is newer than VYM</h3>"
1.16 - "<p>The map you are just trying to load was "
1.17 - "saved using vym " +atts.value("version")+". "
1.18 - "The version of this vym is " + vymVersion +
1.19 - ". If you run into problems after pressing "
1.20 - "the ok-button below, updating vym should help.");
1.21 - else
1.22 - model->setVersion(atts.value( "version" ));
1.23 -
1.24 - }
1.25 -
1.26 if (loadMode==NewMap )
1.27 {
1.28 // Create mapCenter
1.29 @@ -108,6 +89,22 @@
1.30 if (!atts.value( "defXLinkWidth").isEmpty() )
1.31 model->setMapDefXLinkWidth(atts.value("defXLinkWidth").toInt ());
1.32 }
1.33 + // Check version
1.34 + if (!atts.value( "version").isEmpty() )
1.35 + {
1.36 + if (!checkVersion(atts.value("version")))
1.37 + QMessageBox::warning( 0, "Warning: Version Problem" ,
1.38 + "<h3>Map is newer than VYM</h3>"
1.39 + "<p>The map you are just trying to load was "
1.40 + "saved using vym " +atts.value("version")+". "
1.41 + "The version of this vym is " + vymVersion +
1.42 + ". If you run into problems after pressing "
1.43 + "the ok-button below, updating vym should help.");
1.44 + else
1.45 + model->setVersion(atts.value( "version" ));
1.46 +
1.47 + }
1.48 +
1.49 } else if ( eName == "select" && state == StateMap )
1.50 {
1.51 state=StateMapSelect;