]> Shamusworld >> Repos - architektonas/blobdiff - src/applicationwindow.cpp
Fix for missing ampersand in QApplication.
[architektonas] / src / applicationwindow.cpp
index 92c0547f773281dcc7e516db5f4eba1a88f8f408..448b380e276d5cbe7c723b45c942b10a3574439b 100644 (file)
@@ -53,7 +53,7 @@ ApplicationWindow::ApplicationWindow(): settings("Underground Software", "Archit
        CreateToolbars();
 
        //      Create status bar
-       zoomIndicator = new QLabel("Zoom: 12.5%");
+       zoomIndicator = new QLabel("Grid: 12.0\" Zoom: 12.5%");
        statusBar()->addPermanentWidget(zoomIndicator);
        statusBar()->showMessage(tr("Ready"));
 
@@ -167,7 +167,8 @@ when zooming in, new origin will be (xCenter - origin.x) / 2, (yCenter - origin.
 //printf("Zoom in... level going from %02f to ", Painter::zoom);
        // This just zooms leaving origin intact... should zoom in at the current center! [DONE]
        Painter::zoom *= zoomFactor;
-       zoomIndicator->setText(QString("Zoom: %1%").arg(Painter::zoom * 100.0 * SCREEN_ZOOM));
+       drawing->gridSpacing = 12.0 / Painter::zoom;
+       zoomIndicator->setText(QString("Grid: %2\" Zoom: %1%").arg(Painter::zoom * 100.0 * SCREEN_ZOOM).arg(drawing->gridSpacing));
        drawing->UpdateGridBackground();
        drawing->update();
 }
@@ -201,7 +202,8 @@ x 2 = (-426, -301)
 //printf("Zoom out...\n");
        // This just zooms leaving origin intact... should zoom out at the current center! [DONE]
        Painter::zoom /= zoomFactor;
-       zoomIndicator->setText(QString("Zoom: %1%").arg(Painter::zoom * 100.0 * SCREEN_ZOOM));
+       drawing->gridSpacing = 12.0 / Painter::zoom;
+       zoomIndicator->setText(QString("Grid: %2\" Zoom: %1%").arg(Painter::zoom * 100.0 * SCREEN_ZOOM).arg(drawing->gridSpacing));
        drawing->UpdateGridBackground();
        drawing->update();
 }
@@ -263,7 +265,7 @@ void ApplicationWindow::CreateActions(void)
                QIcon(":/res/quit.png"), QKeySequence(tr("Ctrl+q")));
        connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
 
-       snapToGridAct = CreateAction(tr("&Snap To Grid"), tr("Snap To Grid"), tr("Snaps mouse cursor to the visible grid when moving/creating objects."), QIcon(":/res/generic-tool.png"), QKeySequence(tr("S,G")), true);
+       snapToGridAct = CreateAction(tr("Snap To &Grid"), tr("Snap To Grid"), tr("Snaps mouse cursor to the visible grid when moving/creating objects."), QIcon(":/res/generic-tool.png"), QKeySequence(tr("S")), true);
        connect(snapToGridAct, SIGNAL(triggered()), this, SLOT(SnapToGridTool()));
 
        fixAngleAct = CreateAction(tr("Fix &Angle"), tr("Fix Angle"), tr("Fixes the angle of an object."),