diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index defe5b6af..7de3f9905 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -60,7 +60,7 @@ MainWindow::MainWindow(QWidget *parent) dialogCutSpline(QSharedPointer()), dialogCutSplinePath (QSharedPointer()), dialogUnionDetails(QSharedPointer()), dialogCutArc(QSharedPointer()), dialogHistory(0), comboBoxDraws(0), fileName(QString()), changeInFile(false), - mode(Draw::Calculation), currentDrawIndex(0) + mode(Draw::Calculation), currentDrawIndex(0), currentToolBoxIndex(0) { ui->setupUi(this); static const char * GENERIC_ICON_TO_CHECK = "document-open"; @@ -900,7 +900,7 @@ void MainWindow::ActionDraw(bool checked) SetEnableTool(true); doc->setCurrentData(); - ui->toolBox->setCurrentIndex(0); + ui->toolBox->setCurrentIndex(currentToolBoxIndex); } else { @@ -932,6 +932,7 @@ void MainWindow::ActionDetails(bool checked) mode = Draw::Modeling; SetEnableTool(true); + currentToolBoxIndex = ui->toolBox->currentIndex(); ui->toolBox->setCurrentIndex(4); } else diff --git a/src/mainwindow.h b/src/mainwindow.h index e02b7d056..875f1097c 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -510,6 +510,7 @@ private: */ Draw::Draws mode; qint32 currentDrawIndex; + qint32 currentToolBoxIndex; /** * @brief ToolBarOption */