diff -r 96402b172173 -r a8a98a94899a vymmodel.cpp --- a/vymmodel.cpp Wed Oct 29 17:42:34 2008 +0000 +++ b/vymmodel.cpp Tue Nov 04 12:09:10 2008 +0000 @@ -86,6 +86,9 @@ // No MapEditor yet mapEditor=NULL; + // Also no scene yet (should not be needed anyway) FIXME VM + mapScene=NULL; + // History mapNum++; mapChanged=false; @@ -120,6 +123,7 @@ // selections + selModel=NULL; selection.setModel (this); selection.unselect(); @@ -223,7 +227,7 @@ xml.attribut("comment",comment) + xml.attribut("date",getDate()) + xml.attribut("backgroundColor", mapScene->backgroundBrush().color().name() ) + - xml.attribut("selectionColor", selection.getColor().name() ) + + xml.attribut("selectionColor", mapEditor->getSelectionColor().name() ) + xml.attribut("linkStyle", ls ) + xml.attribut("linkColor", defLinkColor.name() ) + xml.attribut("defXLinkColor", defXLinkColor.name() ) + @@ -1589,8 +1593,9 @@ void VymModel::setScene (QGraphicsScene *s) { - mapScene=s; - init(); // Here we have a mapScene set, + cout << "VM::setscene scene="<getParObj(); selection.unselect(); @@ -4131,7 +4139,7 @@ bo->reposition(); i++; } - mapEditor->updateSelection(); + emit (selectionChanged(selModel->selection(), selModel->selection()) ); mapScene->update(); if (!animObjList.isEmpty()) animationTimer->start(); } @@ -4305,12 +4313,12 @@ { if ( !col.isValid() ) return; saveState ( - QString("setSelectionColor (%1)").arg(selection.getColor().name()), + QString("setSelectionColor (%1)").arg(mapEditor->getSelectionColor().name()), QString("setSelectionColor (%1)").arg(col.name()), QString("Set color of selection box to %1").arg(col.name()) ); - selection.setColor (col); + mapEditor->setSelectionColor (col); } void VymModel::updateSelection() @@ -4322,7 +4330,7 @@ { if ( !col.isValid() ) return; saveState ( - QString("setSelectionColor (%1)").arg(selection.getColor().name()), + QString("setSelectionColor (%1)").arg(mapEditor->getSelectionColor().name()), QString("setSelectionColor (%1)").arg(col.name()), QString("Set color of selection box to %1").arg(col.name()) ); @@ -4331,7 +4339,7 @@ QColor VymModel::getSelectionColor() { - return selection.getColor(); + return mapEditor->getSelectionColor(); } void VymModel::setHideTmpMode (HideTmpMode mode) @@ -4359,6 +4367,12 @@ void VymModel::setSelectionModel (QItemSelectionModel *sm) { selModel=sm; + cout << "VM::setSelModel selModel="<