From 558c0d75f592aea0a6cc798175f30bfe3e432834 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Fri, 29 Jan 2016 16:28:05 +0200 Subject: [PATCH] Fixed issue #438. Broken switching pattern pieces. --HG-- branch : release --- src/app/valentina/mainwindow.cpp | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/src/app/valentina/mainwindow.cpp b/src/app/valentina/mainwindow.cpp index 2c94b4cd7..97eafe4ea 100644 --- a/src/app/valentina/mainwindow.cpp +++ b/src/app/valentina/mainwindow.cpp @@ -3901,20 +3901,32 @@ void MainWindow::ZoomFirstShow() /* If don't call ZoomFitBest() twice, after first scaling or moving pattern piece, scene change coordinate and whole * pattern will be moved. Looks very ugly. It is best solution that i have now. */ - ActionDetails(true); - ui->view->ZoomFitBest(); - ActionDraw(true); + if (pattern->DataDetails()->size() > 0) + { + ActionDetails(true); + ui->view->ZoomFitBest(); + } + + if (not ui->actionDraw->isChecked()) + { + ActionDraw(true); + } ui->view->ZoomFitBest(); VMainGraphicsView::NewSceneRect(sceneDraw, ui->view); VMainGraphicsView::NewSceneRect(sceneDetails, ui->view); - ActionDetails(true); - ui->view->ZoomFitBest(); + if (pattern->DataDetails()->size() > 0) + { + ActionDetails(true); + ui->view->ZoomFitBest(); + } - ActionDraw(true); - ui->view->ZoomFitBest(); + if (not ui->actionDraw->isChecked()) + { + ActionDraw(true); + } } //---------------------------------------------------------------------------------------------------------------------