Skip to content

Commit

Permalink
version changed;
Browse files Browse the repository at this point in the history
delete item bug fixed;
default settings changed
  • Loading branch information
aizenbit committed May 19, 2016
1 parent 5b5291d commit e834ae5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class MainWindow : public QMainWindow
QLabel *sheetNumberLabel;
QVector<int> sheetPointers; //pointers to the beginning of the sheets
int currentSheetNumber; //number of sheet that is displaying or rendering now
const QString version = "0.7 beta";
const QString version = "0.8 beta";
void saveAllSheetsToImages(const QString &fileName, const int indexOfExtension);
void saveAllSheetsToPDF(const QString &fileName);
void preparePrinter(QPrinter *printer);
Expand Down
8 changes: 4 additions & 4 deletions preferencesdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ void PreferencesDialog::loadSettingsFromFile()
settings.beginGroup("Settings");
ui->dpiSpinBox->setValue( settings.value("dpi", 300).toInt());
ui->letterSpacingSpinBox->setValue( settings.value("letter-spacing", 1.0).toDouble());
ui->lineSpacingSpinBox->setValue( settings.value("line-spacing", 8.0).toDouble());
ui->lineSpacingSpinBox->setValue( settings.value("line-spacing", 5.0).toDouble());
ui->spacesInTabSpinBox->setValue( settings.value("spaces-in-tab", 4).toInt());
ui->fontSizeSpinBox->setValue( settings.value("font-size", 8.0).toDouble());
ui->fontSizeSpinBox->setValue( settings.value("font-size", 5.0).toDouble());
ui->penWidthSpinBox->setValue( settings.value("pen-width", 0.5).toDouble());
ui->sheetWidthSpinBox->setValue( settings.value("sheet-width", 148).toInt());
ui->sheetHeightSpinBox->setValue( settings.value("sheet-height", 210).toInt());
ui->sheetWidthSpinBox->setValue( settings.value("sheet-width", 210).toInt());
ui->sheetHeightSpinBox->setValue( settings.value("sheet-height", 297).toInt());
ui->rightMarginsSpinBox->setValue( settings.value("right-margin", 20).toInt());
ui->leftMarginsSpinBox->setValue( settings.value("left-margin", 10).toInt());
ui->topMarginsSpinBox->setValue( settings.value("top-margin", 10).toInt());
Expand Down
8 changes: 5 additions & 3 deletions svgview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,11 @@ bool SvgView::hyphenate(QStringRef text, int currentSymbolIndex)
if (indexOfLastHyphen > 0 && symbolsToWrap > 0)
{
int itemsCount = scene->items().size();

int itemsToWrap = symbolsToWrap;
if (connectLetters)
itemsToWrap = symbolsToWrap * 2 - 1;
if (connectLetters && hyphenWord.at(currentSymbolInWord).isLetter())
scene->removeItem(scene->items(Qt::AscendingOrder).at(itemsCount - 1));
scene->removeItem(scene->items(Qt::AscendingOrder).at(itemsCount - itemsToWrap));

QGraphicsSvgItem *hyphen = generateHyphen(symbolsToWrap);
wrapLastSymbols(symbolsToWrap);
Expand All @@ -229,7 +231,7 @@ void SvgView::wrapLastSymbols(int symbolsToWrap)
return;

int itemsCount = scene->items().size();
qreal itemsToWrap = symbolsToWrap;
int itemsToWrap = symbolsToWrap;
qreal letterHeight = fontSize * dpmm;

if (connectLetters)
Expand Down

0 comments on commit e834ae5

Please sign in to comment.