diff -r 1d092be4fe33 -r dba9303a1a5c mapeditor.cpp --- a/mapeditor.cpp Wed May 18 07:39:51 2005 +0000 +++ b/mapeditor.cpp Wed May 18 07:39:58 2005 +0000 @@ -322,6 +322,9 @@ selectionLast=NULL; movingObj=NULL; + defXLinkWidth=1; + defXLinkColor=QColor (230,230,230); + mapChanged=false; mapDefault=true; mapUnsaved=false; @@ -512,8 +515,8 @@ attribut("backgroundColor", mapCanvas->backgroundColor().name() ) + attribut("linkStyle", ls ) + attribut("linkColor", defLinkColor.name() ) + - attribut("xlinkColor", defXLinkColor.name() ) + - attribut("xlinkWidth", QString().setNum(defXLinkWidth,10) ) + + attribut("defXLinkColor", defXLinkColor.name() ) + + attribut("defXLinkWidth", QString().setNum(defXLinkWidth,10) ) + colhint; s+=beginElement("vymmap",mapAttr); incIndent(); @@ -864,7 +867,7 @@ double paperAspect = (double)metrics.width() / (double)metrics.height(); double mapAspect = (double)totalBBox.width() / (double)totalBBox.height(); - QRect mapRect=mapCenter->getTotalBBox(); + QRect mapRect=totalBBox; QCanvasRectangle *frame=NULL; QCanvasText *footerFN=NULL; QCanvasText *footerDate=NULL; @@ -874,14 +877,22 @@ if (printFrame) { // Print frame around map - mapRect.setRect (mapRect.x()-10, mapRect.y()-10, - mapRect.width()+20, mapRect.height()+20); + mapRect.setRect (totalBBox.x()-10, totalBBox.y()-10, + totalBBox.width()+20, totalBBox.height()+20); frame=new QCanvasRectangle (mapRect,mapCanvas); frame->setBrush (QColor(white)); frame->setPen (QColor(black)); frame->setZ(0); frame->show(); } + /* FIXME testing + QCanvasLine *l=new QCanvasLine (mapCanvas); + l->setPoints (0,0,mapRect.width(),mapRect.height()); + l->setPen (QPen(QColor(black), 1)); + l->setZ (200); + l->show(); + */ + if (printFooter) { // Print footer below map @@ -899,10 +910,8 @@ footerDate->move (mapRect.x()+mapRect.width()-footerDate->boundingRect().width(), mapRect.y() + mapRect.height() ); footerDate->setZ(Z_TEXT); footerDate->show(); - mapRect.setRect (mapRect.x(), mapRect.y(), - mapRect.width(), mapRect.height()+20); } - pp.setWindow (mapRect.x(), mapRect.y(), mapRect.width(), mapRect.height()); + pp.setWindow (mapRect.x(), mapRect.y(), mapRect.width(), mapRect.height()+20); } else { pp.setWindow (mapRect); @@ -2395,6 +2404,8 @@ { linkstyle=ls; + setChanged(); + saveState(); BranchObj *bo; bo=mapCenter->first(); bo=bo->next(); @@ -2403,8 +2414,7 @@ bo->setLinkStyle(bo->getDefLinkStyle()); bo=bo->next(); } - //setChanged(); - //saveState(); + mapCenter->reposition(); } LinkStyle MapEditor::getLinkStyle () @@ -2732,6 +2742,7 @@ { EditXLinkDialog dia; dia.setXLink (xlo); + dia.setSelection(selection); if (dia.exec() == QDialog::Accepted) { if (dia.useSettingsGlobal() )