diff -r c56ce5d81cc3 -r 72afe12da1c8 mapeditor.cpp --- a/mapeditor.cpp Tue Apr 10 13:22:51 2007 +0000 +++ b/mapeditor.cpp Tue Apr 10 13:22:52 2007 +0000 @@ -434,7 +434,7 @@ // Split string s into command and parameters parser.parseAtom (atom); - QString com=parser.command(); + QString com=parser.getCommand(); // External commands if (com=="addBranch") @@ -508,6 +508,19 @@ addMapInsertInt(t,y); } } + } else if (com=="clearFlags") + { + if (xelection.isEmpty() ) + { + parser.setError (Aborted,"Nothing selected"); + } else if (! selb ) + { + parser.setError (Aborted,"Type of selection is not a branch"); + } else if (parser.checkParamCount(0)) + { + selb->clearStandardFlags(); + selb->updateFlagsToolbar(); + } } else if (com=="colorBranch") { if (xelection.isEmpty()) @@ -957,6 +970,23 @@ if (ok) setFrameType (s); } + } else if (com=="toggleFlag") + { + if (xelection.isEmpty() ) + { + parser.setError (Aborted,"Nothing selected"); + } else if (! selb ) + { + parser.setError (Aborted,"Type of selection is not a branch"); + } else if (parser.checkParamCount(1)) + { + s=parser.parString(ok,0); + if (ok) + { + selb->toggleStandardFlag(s); + selb->updateFlagsToolbar(); + } + } } else if (com=="unscroll") { if (xelection.isEmpty() ) @@ -1006,11 +1036,10 @@ void MapEditor::runScript (QString script) { - // FIXME "atomize" script, currently each line holds one atom - parser.setScript (script); parser.runScript(); - + while (parser.next() ) + parseAtom(parser.getAtom()); } bool MapEditor::isDefault()