1.1 --- a/mapeditor.cpp Wed May 18 07:39:51 2005 +0000
1.2 +++ b/mapeditor.cpp Wed May 18 07:39:58 2005 +0000
1.3 @@ -322,6 +322,9 @@
1.4 selectionLast=NULL;
1.5 movingObj=NULL;
1.6
1.7 + defXLinkWidth=1;
1.8 + defXLinkColor=QColor (230,230,230);
1.9 +
1.10 mapChanged=false;
1.11 mapDefault=true;
1.12 mapUnsaved=false;
1.13 @@ -512,8 +515,8 @@
1.14 attribut("backgroundColor", mapCanvas->backgroundColor().name() ) +
1.15 attribut("linkStyle", ls ) +
1.16 attribut("linkColor", defLinkColor.name() ) +
1.17 - attribut("xlinkColor", defXLinkColor.name() ) +
1.18 - attribut("xlinkWidth", QString().setNum(defXLinkWidth,10) ) +
1.19 + attribut("defXLinkColor", defXLinkColor.name() ) +
1.20 + attribut("defXLinkWidth", QString().setNum(defXLinkWidth,10) ) +
1.21 colhint;
1.22 s+=beginElement("vymmap",mapAttr);
1.23 incIndent();
1.24 @@ -864,7 +867,7 @@
1.25 double paperAspect = (double)metrics.width() / (double)metrics.height();
1.26 double mapAspect = (double)totalBBox.width() / (double)totalBBox.height();
1.27
1.28 - QRect mapRect=mapCenter->getTotalBBox();
1.29 + QRect mapRect=totalBBox;
1.30 QCanvasRectangle *frame=NULL;
1.31 QCanvasText *footerFN=NULL;
1.32 QCanvasText *footerDate=NULL;
1.33 @@ -874,14 +877,22 @@
1.34 if (printFrame)
1.35 {
1.36 // Print frame around map
1.37 - mapRect.setRect (mapRect.x()-10, mapRect.y()-10,
1.38 - mapRect.width()+20, mapRect.height()+20);
1.39 + mapRect.setRect (totalBBox.x()-10, totalBBox.y()-10,
1.40 + totalBBox.width()+20, totalBBox.height()+20);
1.41 frame=new QCanvasRectangle (mapRect,mapCanvas);
1.42 frame->setBrush (QColor(white));
1.43 frame->setPen (QColor(black));
1.44 frame->setZ(0);
1.45 frame->show();
1.46 }
1.47 + /* FIXME testing
1.48 + QCanvasLine *l=new QCanvasLine (mapCanvas);
1.49 + l->setPoints (0,0,mapRect.width(),mapRect.height());
1.50 + l->setPen (QPen(QColor(black), 1));
1.51 + l->setZ (200);
1.52 + l->show();
1.53 + */
1.54 +
1.55 if (printFooter)
1.56 {
1.57 // Print footer below map
1.58 @@ -899,10 +910,8 @@
1.59 footerDate->move (mapRect.x()+mapRect.width()-footerDate->boundingRect().width(), mapRect.y() + mapRect.height() );
1.60 footerDate->setZ(Z_TEXT);
1.61 footerDate->show();
1.62 - mapRect.setRect (mapRect.x(), mapRect.y(),
1.63 - mapRect.width(), mapRect.height()+20);
1.64 }
1.65 - pp.setWindow (mapRect.x(), mapRect.y(), mapRect.width(), mapRect.height());
1.66 + pp.setWindow (mapRect.x(), mapRect.y(), mapRect.width(), mapRect.height()+20);
1.67 } else
1.68 {
1.69 pp.setWindow (mapRect);
1.70 @@ -2395,6 +2404,8 @@
1.71 {
1.72 linkstyle=ls;
1.73
1.74 + setChanged();
1.75 + saveState();
1.76 BranchObj *bo;
1.77 bo=mapCenter->first();
1.78 bo=bo->next();
1.79 @@ -2403,8 +2414,7 @@
1.80 bo->setLinkStyle(bo->getDefLinkStyle());
1.81 bo=bo->next();
1.82 }
1.83 - //setChanged();
1.84 - //saveState();
1.85 + mapCenter->reposition();
1.86 }
1.87
1.88 LinkStyle MapEditor::getLinkStyle ()
1.89 @@ -2732,6 +2742,7 @@
1.90 {
1.91 EditXLinkDialog dia;
1.92 dia.setXLink (xlo);
1.93 + dia.setSelection(selection);
1.94 if (dia.exec() == QDialog::Accepted)
1.95 {
1.96 if (dia.useSettingsGlobal() )