From 2fbd01d89a18d2840992a38d0b256bbcc40acf02 Mon Sep 17 00:00:00 2001 From: Valentina Zhuravska Date: Wed, 25 Nov 2015 04:29:12 +0200 Subject: [PATCH] Correct save of currentDrawIndex --HG-- branch : feature --- src/app/valentina/mainwindow.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/app/valentina/mainwindow.cpp b/src/app/valentina/mainwindow.cpp index 234b4e24a..e9d58cd47 100644 --- a/src/app/valentina/mainwindow.cpp +++ b/src/app/valentina/mainwindow.cpp @@ -1822,8 +1822,11 @@ void MainWindow::ActionDetails(bool checked) disconnect(ui->view, &VMainGraphicsView::NewFactor, sceneDraw, &VMainGraphicsScene::SetFactor); RestoreCurrentScene(); + if(drawMode) + { + currentDrawIndex = comboBoxDraws->currentIndex();//save current pattern peace + } drawMode = false; - currentDrawIndex = comboBoxDraws->currentIndex();//save current pattern peace comboBoxDraws->setCurrentIndex(comboBoxDraws->count()-1); comboBoxDraws->setEnabled(false); @@ -1905,8 +1908,12 @@ void MainWindow::ActionLayout(bool checked) ui->view->setScene(currentScene); disconnect(ui->view, &VMainGraphicsView::NewFactor, sceneDraw, &VMainGraphicsScene::SetFactor); + if(drawMode) + { + currentDrawIndex = comboBoxDraws->currentIndex();//save current pattern peace + } drawMode = false; - currentDrawIndex = comboBoxDraws->currentIndex();//save current pattern peace + comboBoxDraws->setCurrentIndex(-1); comboBoxDraws->setEnabled(false);