diff -r 513107d1ed59 -r d7d0708b1c60 mainwindow.cpp --- a/mainwindow.cpp Tue Dec 04 12:32:56 2007 +0000 +++ b/mainwindow.cpp Tue Dec 04 12:32:59 2007 +0000 @@ -1395,7 +1395,7 @@ a = new QAction( tr( "Autosave","Settings action"), this); a->setStatusTip( tr( "Autosave")); a->setToggleAction(true); - a->setOn ( settings.value ("/mapeditor/autosave/use",true).toBool()); + a->setOn ( settings.value ("/mapeditor/autosave/use",false).toBool()); connect( a, SIGNAL( triggered() ), this, SLOT( settingsAutosaveToggle() ) ); settingsMenu->addAction (a); actionSettingsAutosaveToggle=a; @@ -1406,8 +1406,8 @@ settingsMenu->addAction (a); actionSettingsAutosaveTime=a; - a = new QAction( tr( "Backup file","Settings action"), this); - a->setStatusTip( tr( "Write backup file")); + a = new QAction( tr( "Write backup file on save","Settings action"), this); + a->setStatusTip( tr( "Write backup file on save")); a->setToggleAction(true); a->setOn ( settings.value ("/mainwindow/writeBackupFile",false).toBool()); connect( a, SIGNAL( triggered() ), this, SLOT( settingsWriteBackupFileToggle() ) ); @@ -2845,11 +2845,22 @@ */ } +#include "attribute.h" #include "attributedialog.h" void Main::editAttribute() { - AttributeDialog dia; - dia.exec(); + MapEditor *me=currentMapEditor(); + if (me) + { + BranchObj *bo=me->getSelectedBranch(); + if (bo) + { + AttributeDialog dia(this); + dia.setTable (me->attributeTable() ); + dia.setBranch (bo); + dia.exec(); + } + } /* if (currentMapEditor()) { @@ -3472,12 +3483,11 @@ if(currentMapEditor()) { - LinkableMapObj *sel=currentMapEditor()->getSelection(); - if (sel && (typeid(*sel) == typeid(BranchObj) || - typeid(*sel) == typeid(MapCenterObj))) + BranchObj *bo=currentMapEditor()->getSelectedBranch(); + if (bo) { branchPropertyWindow->setMapEditor(currentMapEditor()); - branchPropertyWindow->setBranch((BranchObj*)sel); + branchPropertyWindow->setBranch(bo); return; }