From 8ba89296d9b4fe459aebd3b92d2360a7e9f82403 Mon Sep 17 00:00:00 2001 From: aizenbit Date: Thu, 10 Mar 2016 20:06:14 +0300 Subject: [PATCH] few bugs fixed; version changed --- mainwindow.cpp | 1 + mainwindow.h | 2 +- preferencesdialog.cpp | 2 +- svgview.cpp | 3 +-- svgview.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index dbe5b95..bcef985 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -75,6 +75,7 @@ MainWindow::MainWindow(QWidget *parent) : connect(fontDialog, SIGNAL(fontReady()), ui->svgView, SLOT(loadFont())); + errorMessage->setModal(true); ui->toolBar->actions()[ToolButton::Render]->setShortcut(Qt::ControlModifier + Qt::Key_R); ui->toolBar->actions()[ToolButton::Print]->setShortcut(Qt::ControlModifier + Qt::Key_P); diff --git a/mainwindow.h b/mainwindow.h index 0871ad0..0a5e87a 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -46,7 +46,7 @@ class MainWindow : public QMainWindow QLabel *sheetNumberLabel; QVector sheetPointers; //pointers to the beginning of the sheets int currentSheetNumber; //number of sheet that is displaying or rendering now - const QString version = "0.6 alpha"; + const QString version = "0.7 beta"; void saveAllSheetsToImages(const QString &fileName, const int indexOfExtension); void saveAllSheetsToPDF(const QString &fileName); void preparePrinter(QPrinter *printer); diff --git a/preferencesdialog.cpp b/preferencesdialog.cpp index 7b28b3f..33fb2c9 100644 --- a/preferencesdialog.cpp +++ b/preferencesdialog.cpp @@ -105,7 +105,7 @@ void PreferencesDialog::loadSettingsFromFile() ui->roundCheckBox->setChecked( settings.value("round-lines", true).toBool()); ui->scaleCanvsaCheckBox->setChecked(settings.value("scale-canvas", true).toBool()); changedByProgram = true; - ui->scaleCanvasSpinBox->setValue( settings.value("scale-canvas-value", 0.5).toDouble()); + ui->scaleCanvasSpinBox->setValue( settings.value("scale-canvas-value", 1.0).toDouble()); changedByProgram = false; ui->alternateMarginsCheckBox->setChecked(settings.value("alternate-margins-of-even-sheets", true).toBool()); ui->connectLettersCheckBox->setChecked( settings.value("connect-letters", true).toBool()); diff --git a/svgview.cpp b/svgview.cpp index 1c2748a..28c929b 100644 --- a/svgview.cpp +++ b/svgview.cpp @@ -80,8 +80,7 @@ int SvgView::renderText(const QStringRef &text) data.scale /= 5; symbolItem->setScale(data.scale); - symbolBoundingSize.setWidth(symbolItem->boundingRect().width() * symbolItem->scale()); - symbolBoundingSize.setHeight(symbolItem->boundingRect().height() * symbolItem->scale()); + symbolBoundingSize = symbolItem->boundingRect().size() * symbolItem->scale(); cursor.rx() -= symbolBoundingSize.width() * symbolData.limits.topLeft().x(); qreal letterWidth = data.width * data.symbolData.limits.width() * data.scale; diff --git a/svgview.h b/svgview.h index ec718ce..07edc49 100644 --- a/svgview.h +++ b/svgview.h @@ -68,7 +68,7 @@ public slots: SymbolData symbolData, previousLetterData; QRectF currentMarginsRect; - QSize symbolBoundingSize; + QSizeF symbolBoundingSize; QPointF cursor, previousLetterCursor; QGraphicsSvgItem *lastLetter;