diff -r 7f43b93242aa -r 96402b172173 xml-vym.cpp --- a/xml-vym.cpp Mon Oct 06 11:10:20 2008 +0000 +++ b/xml-vym.cpp Wed Oct 29 17:42:34 2008 +0000 @@ -47,25 +47,6 @@ { state = StateMap; - if (loadMode==NewMap) - model->clear(); // remove existing mapCenter - - // Check version - if (!atts.value( "version").isEmpty() ) - { - if (!checkVersion(atts.value("version"))) - QMessageBox::warning( 0, "Warning: Version Problem" , - "

Map is newer than VYM

" - "

The map you are just trying to load was " - "saved using vym " +atts.value("version")+". " - "The version of this vym is " + vymVersion + - ". If you run into problems after pressing " - "the ok-button below, updating vym should help."); - else - model->setVersion(atts.value( "version" )); - - } - if (loadMode==NewMap ) { // Create mapCenter @@ -108,6 +89,22 @@ if (!atts.value( "defXLinkWidth").isEmpty() ) model->setMapDefXLinkWidth(atts.value("defXLinkWidth").toInt ()); } + // Check version + if (!atts.value( "version").isEmpty() ) + { + if (!checkVersion(atts.value("version"))) + QMessageBox::warning( 0, "Warning: Version Problem" , + "

Map is newer than VYM

" + "

The map you are just trying to load was " + "saved using vym " +atts.value("version")+". " + "The version of this vym is " + vymVersion + + ". If you run into problems after pressing " + "the ok-button below, updating vym should help."); + else + model->setVersion(atts.value( "version" )); + + } + } else if ( eName == "select" && state == StateMap ) { state=StateMapSelect;