Merge with develop.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2017-08-10 17:14:57 +03:00
commit bc96184617
3 changed files with 6 additions and 39 deletions

View File

@ -568,8 +568,8 @@ void MainWindow::SetToolButton(bool checked, Tool t, const QString &cursor, cons
} }
} }
QPixmap pixmap(cursorResource); QPixmap pixmap(cursorResource);
QCursor cur(pixmap, 2, 3); QCursor cur(pixmap, 2, 2);
ui->view->setCursor(cur); ui->view->viewport()->setCursor(cur);
helpLabel->setText(toolTip); helpLabel->setText(toolTip);
ui->view->setShowToolOptions(false); ui->view->setShowToolOptions(false);
dialogTool = QSharedPointer<Dialog>(new Dialog(pattern, 0, this)); dialogTool = QSharedPointer<Dialog>(new Dialog(pattern, 0, this));
@ -2201,7 +2201,7 @@ void MainWindow::ArrowTool()
ui->view->AllowRubberBand(true); ui->view->AllowRubberBand(true);
ui->view->setCursor(Qt::ArrowCursor); ui->view->viewport()->unsetCursor();
helpLabel->setText(""); helpLabel->setText("");
ui->view->setShowToolOptions(true); ui->view->setShowToolOptions(true);
qCDebug(vMainWindow, "Enabled arrow tool."); qCDebug(vMainWindow, "Enabled arrow tool.");

View File

@ -1015,23 +1015,7 @@ void MainWindowsNoGUI::FlatDxfFile(const QString &name, int version, bool binary
generator.setResolution(PrintDPI); generator.setResolution(PrintDPI);
generator.SetVersion(static_cast<DRW::Version>(version)); generator.SetVersion(static_cast<DRW::Version>(version));
generator.SetBinaryFormat(binary); generator.SetBinaryFormat(binary);
generator.setInsunits(VarInsunits::Millimeters);// Decided to always use mm. See issue #745
switch (*pattern->GetPatternUnit())
{
case Unit::Cm:
generator.setInsunits(VarInsunits::Centimeters);
break;
case Unit::Mm:
generator.setInsunits(VarInsunits::Millimeters);
break;
case Unit::Inch:
generator.setInsunits(VarInsunits::Inches);
break;
case Unit::Px:
case Unit::LAST_UNIT_DO_NOT_USE:
Q_UNREACHABLE();
break;
}
QPainter painter; QPainter painter;
if (painter.begin(&generator)) if (painter.begin(&generator))
@ -1052,24 +1036,7 @@ void MainWindowsNoGUI::AAMADxfFile(const QString &name, int version, bool binary
generator.setResolution(PrintDPI); generator.setResolution(PrintDPI);
generator.SetVersion(static_cast<DRW::Version>(version)); generator.SetVersion(static_cast<DRW::Version>(version));
generator.SetBinaryFormat(binary); generator.SetBinaryFormat(binary);
generator.setInsunits(VarInsunits::Millimeters);// Decided to always use mm. See issue #745
switch (*pattern->GetPatternUnit())
{
case Unit::Cm:
generator.setInsunits(VarInsunits::Centimeters);
break;
case Unit::Mm:
generator.setInsunits(VarInsunits::Millimeters);
break;
case Unit::Inch:
generator.setInsunits(VarInsunits::Inches);
break;
case Unit::Px:
case Unit::LAST_UNIT_DO_NOT_USE:
Q_UNREACHABLE();
break;
}
generator.ExportToAAMA(details); generator.ExportToAAMA(details);
} }

View File

@ -81,7 +81,7 @@ VDxfEngine::VDxfEngine()
matrix(), matrix(),
input(), input(),
varMeasurement(VarMeasurement::Metric), varMeasurement(VarMeasurement::Metric),
varInsunits(VarInsunits::Centimeters), varInsunits(VarInsunits::Millimeters),
textBuffer(new DRW_Text()) textBuffer(new DRW_Text())
{ {
} }