Remember current tool box index in draw mode.

--HG--
branch : feature
This commit is contained in:
dismine 2014-01-08 22:45:42 +02:00
parent 777547a59e
commit f948a80c8a
2 changed files with 4 additions and 2 deletions

View File

@ -60,7 +60,7 @@ MainWindow::MainWindow(QWidget *parent)
dialogCutSpline(QSharedPointer<DialogCutSpline>()), dialogCutSplinePath (QSharedPointer<DialogCutSplinePath>()),
dialogUnionDetails(QSharedPointer<DialogUnionDetails>()), dialogCutArc(QSharedPointer<DialogCutArc>()),
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

View File

@ -510,6 +510,7 @@ private:
*/
Draw::Draws mode;
qint32 currentDrawIndex;
qint32 currentToolBoxIndex;
/**
* @brief ToolBarOption
*/