diff -r 1b4d1ea6ea8c -r 54d44ecd6097 vymmodel.cpp --- a/vymmodel.cpp Fri Mar 06 15:02:58 2009 +0000 +++ b/vymmodel.cpp Thu Mar 19 11:45:28 2009 +0000 @@ -66,7 +66,6 @@ void VymModel::clear() { - cout << "VymModel::clear rows="<clearSelection(); // Remove stuff @@ -147,8 +146,6 @@ hidemode=HideNone; - - // Network netstate=Offline; @@ -179,6 +176,7 @@ void VymModel::updateActions() // FIXME maybe don't update if blockReposition is set { + cout << "VymModel::updateActions \n"; // Tell mainwindow to update states of actions mainWindow->updateActions(); } @@ -224,6 +222,7 @@ mapAttr+= xml.attribut("author",author) + xml.attribut("comment",comment) + xml.attribut("date",getDate()) + + xml.attribut("countBranches", QString().number(countBranches())) + xml.attribut("backgroundColor", mapScene->backgroundBrush().color().name() ) + xml.attribut("selectionColor", mapEditor->getSelectionColor().name() ) + xml.attribut("linkStyle", ls ) + @@ -889,6 +888,12 @@ void VymModel::autosave() { + if (filePath=="") + { + if (debug) + cout << "VymModel::autosave rejected due to missing filePath\n"; + } + QDateTime now=QDateTime().currentDateTime(); // Disable autosave, while we have gone back in history @@ -899,7 +904,7 @@ if (filePath.isEmpty()) return; - if (mapUnsaved &&mapChanged && settings.value ("/autosave/use",true).toBool() ) + if (mapUnsaved &&mapChanged && settings.value ("/mainwindow/autosave/use",true).toBool() ) { if (QFileInfo(filePath).lastModified()<=fileChangedTime) mainWindow->fileSave (this); @@ -959,8 +964,12 @@ void VymModel::setChanged() { + cout << "VM::setChanged()\n"; if (!mapChanged) - autosaveTimer->start(settings.value("/autosave/ms/",300000).toInt()); + { + autosaveTimer->start(settings.value("/mainwindow/autosave/ms/",300000).toInt()); + cout <<" timer started with "<selection(); - /* - cout << "VM::updateSelection new="; - if (!newsel.indexes().isEmpty() ) - cout << newsel.indexes().first().row()<<"," << newsel.indexes().first().column(); - cout << " old="; - if (!oldsel.indexes().isEmpty() ) - cout << oldsel.indexes().first().row()<<"," << oldsel.indexes().first().column(); - cout <