Do zoom fit best current pattern piece only in Draw mode.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2018-04-20 09:35:13 +03:00
parent 678792ca5c
commit 72399472a1

View File

@ -1295,6 +1295,8 @@ void MainWindow::ClosedDialogInsertNode(int result)
//---------------------------------------------------------------------------------------------------------------------
void MainWindow::ZoomFitBestCurrent()
{
if(drawMode)
{
const QRectF rect = doc->ActiveDrawBoundingRect();
if (rect.isEmpty())
{
@ -1311,6 +1313,7 @@ void MainWindow::ZoomFitBestCurrent()
transform.setMatrix(factor, transform.m12(), transform.m13(), transform.m21(), factor, transform.m23(),
transform.m31(), transform.m32(), transform.m33());
ui->view->setTransform(transform);
}
}
//---------------------------------------------------------------------------------------------------------------------