From a693f9e57d0d7d0cbc76c3ade7a872a73845c94f Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Fri, 29 Jan 2016 16:30:57 +0200 Subject: [PATCH] Fixed issue #438. Broken switching pattern pieces. (grafted from 6448ff0d78086ccb1182cf981c95239f36d22e83) --HG-- branch : develop --- 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 643bf4511..16df2520a 100644 --- a/src/app/valentina/mainwindow.cpp +++ b/src/app/valentina/mainwindow.cpp @@ -3945,20 +3945,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); + } } //---------------------------------------------------------------------------------------------------------------------