X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fapplicationwindow.cpp;h=cb4f020f5e9ab531217feeef9f62bdd7d076d453;hb=c58b8a9f8b1ae5494857fc423ed8e33b2bbcf329;hp=71e8a087d5618225543d37438e1e5b8c23986d53;hpb=6ce9d9112c232f02b2be6cbdedbeb89c28bc713a;p=architektonas diff --git a/src/applicationwindow.cpp b/src/applicationwindow.cpp index 71e8a08..cb4f020 100644 --- a/src/applicationwindow.cpp +++ b/src/applicationwindow.cpp @@ -178,7 +178,8 @@ void ApplicationWindow::FileSave(void) msg.setIcon(QMessageBox::Critical); msg.exec(); // In this case, we should unlink the created file, since it's not right... - unlink(documentName.toAscii().data()); +// unlink(documentName.toAscii().data()); + QFile::remove(documentName); return; } @@ -312,18 +313,14 @@ when zooming in, new origin will be (xCenter - origin.x) / 2, (yCenter - origin. Painter::origin = newOrigin; //printf("Zoom in... level going from %02f to ", Painter::zoom); - // This just zooms leaving origin intact... should zoom in at the current center! [DONE] - // This should actually be calculated by drawing->gridPixels / grid size. + // This just zooms leaving origin intact... should zoom in at the current + // center! [DONE] Painter::zoom *= zoomFactor; -// drawing->gridSpacing = drawing->gridPixels / Painter::zoom; Object::gridSpacing = drawing->gridPixels / Painter::zoom; -// zoomIndicator->setText(QString("Grid: %2\" Zoom: %1%").arg(Painter::zoom * 100.0 * SCREEN_ZOOM).arg(drawing->gridSpacing)); -// zoomIndicator->setText(QString("Grid: %1\", BU: Inch").arg(drawing->gridSpacing)); - zoomIndicator->setText(QString("Grid: %1\", BU: Inch").arg(Object::gridSpacing)); drawing->UpdateGridBackground(); drawing->update(); -// baseUnitInput->setText(QString("%1").arg(drawing->gridSpacing)); + zoomIndicator->setText(QString("Grid: %1\", BU: Inch").arg(Object::gridSpacing)); baseUnitInput->setText(QString("%1").arg(Object::gridSpacing)); } @@ -355,17 +352,14 @@ x 2 = (-426, -301) //printf("newOrigin=%.2f,%.2f;\n", newOrigin.x, newOrigin.y); Painter::origin = newOrigin; //printf("Zoom out...\n"); - // This just zooms leaving origin intact... should zoom out at the current center! [DONE] + // This just zooms leaving origin intact... should zoom out at the current + // center! [DONE] Painter::zoom /= zoomFactor; -// drawing->gridSpacing = drawing->gridPixels / Painter::zoom; Object::gridSpacing = drawing->gridPixels / Painter::zoom; -// zoomIndicator->setText(QString("Grid: %2\" Zoom: %1%").arg(Painter::zoom * 100.0 * SCREEN_ZOOM).arg(drawing->gridSpacing)); -// zoomIndicator->setText(QString("Grid: %1\", BU: Inch").arg(drawing->gridSpacing)); - zoomIndicator->setText(QString("Grid: %1\", BU: Inch").arg(Object::gridSpacing)); drawing->UpdateGridBackground(); drawing->update(); -// baseUnitInput->setText(QString("%1").arg(drawing->gridSpacing)); + zoomIndicator->setText(QString("Grid: %1\", BU: Inch").arg(Object::gridSpacing)); baseUnitInput->setText(QString("%1").arg(Object::gridSpacing)); }