diff -r 1c8ff1928b97 -r 5db8dfd30ea2 mapeditor.cpp --- a/mapeditor.cpp Thu Nov 23 13:53:08 2006 +0000 +++ b/mapeditor.cpp Thu Nov 23 16:18:26 2006 +0000 @@ -1,7 +1,5 @@ #include "mapeditor.h" -//#include -#include #include #include @@ -498,8 +496,8 @@ if (saveSel) cout << " saveSel="<getSelectString().ascii()<updateHistory (undoSet); - setChanged(); updateActions(); } @@ -1208,9 +1206,7 @@ // e.g. (0,50,700,700) is upper part on A4 // see also /usr/lib/qt3/doc/html/coordsys.html - Q3PaintDeviceMetrics metrics (printer); - - double paperAspect = (double)metrics.width() / (double)metrics.height(); + double paperAspect = (double)printer->width() / (double)printer->height(); double mapAspect = (double)totalBBox.width() / (double)totalBBox.height(); QRect mapRect=totalBBox; @@ -1266,11 +1262,11 @@ if (mapAspect>=paperAspect) { // Fit horizontally to paper width - pp.setViewport(0,0, metrics.width(),(int)(metrics.width()/mapAspect) ); + pp.setViewport(0,0, printer->width(),(int)(printer->width()/mapAspect) ); } else { // Fit vertically to paper height - pp.setViewport(0,0,(int)(metrics.height()*mapAspect),metrics.height()); + pp.setViewport(0,0,(int)(printer->height()*mapAspect),printer->height()); } mapCanvas->drawArea(mapRect, &pp); // draw Canvas to printer @@ -1509,8 +1505,8 @@ undoSet.setEntry ("/history/curStep",QString::number(curStep)); undoSet.writeSettings(histPath); + updateActions(); mainWindow->updateHistory (undoSet); - updateActions(); /* TODO remove testing cout << "ME::redo() end\n"; @@ -4081,7 +4077,7 @@ // Contains url to the img src in unicode16 QByteArray d = event->encodedData("application/x-moz-file-promise-url"); QString url = QString((const QChar*)d.data(),d.size()/2); - fetchImage(url); + //FIXME fetchImage(url); event->acceptProposedAction(); update=true; } else if (event->mimeData()->hasUrls()) @@ -4195,7 +4191,8 @@ } -void MapEditor::imageDataFetched(const QByteArray &a, Q3NetworkOperation */*nop*/) +//void MapEditor::imageDataFetched(const QByteArray &a, Q3NetworkOperation */*nop*/) +/* FIXME not needed in QT4 { if (!imageBuffer) imageBuffer = new QBuffer(); if (!imageBuffer->isOpen()) { @@ -4238,3 +4235,5 @@ this, SLOT(imageDataFetched(const QByteArray &, Q3NetworkOperation *))); urlOperator->get(); } + +*/