Remember current tool box index in draw mode.
--HG-- branch : feature
This commit is contained in:
parent
777547a59e
commit
f948a80c8a
|
@ -60,7 +60,7 @@ MainWindow::MainWindow(QWidget *parent)
|
||||||
dialogCutSpline(QSharedPointer<DialogCutSpline>()), dialogCutSplinePath (QSharedPointer<DialogCutSplinePath>()),
|
dialogCutSpline(QSharedPointer<DialogCutSpline>()), dialogCutSplinePath (QSharedPointer<DialogCutSplinePath>()),
|
||||||
dialogUnionDetails(QSharedPointer<DialogUnionDetails>()), dialogCutArc(QSharedPointer<DialogCutArc>()),
|
dialogUnionDetails(QSharedPointer<DialogUnionDetails>()), dialogCutArc(QSharedPointer<DialogCutArc>()),
|
||||||
dialogHistory(0), comboBoxDraws(0), fileName(QString()), changeInFile(false),
|
dialogHistory(0), comboBoxDraws(0), fileName(QString()), changeInFile(false),
|
||||||
mode(Draw::Calculation), currentDrawIndex(0)
|
mode(Draw::Calculation), currentDrawIndex(0), currentToolBoxIndex(0)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
static const char * GENERIC_ICON_TO_CHECK = "document-open";
|
static const char * GENERIC_ICON_TO_CHECK = "document-open";
|
||||||
|
@ -900,7 +900,7 @@ void MainWindow::ActionDraw(bool checked)
|
||||||
|
|
||||||
SetEnableTool(true);
|
SetEnableTool(true);
|
||||||
doc->setCurrentData();
|
doc->setCurrentData();
|
||||||
ui->toolBox->setCurrentIndex(0);
|
ui->toolBox->setCurrentIndex(currentToolBoxIndex);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -932,6 +932,7 @@ void MainWindow::ActionDetails(bool checked)
|
||||||
|
|
||||||
mode = Draw::Modeling;
|
mode = Draw::Modeling;
|
||||||
SetEnableTool(true);
|
SetEnableTool(true);
|
||||||
|
currentToolBoxIndex = ui->toolBox->currentIndex();
|
||||||
ui->toolBox->setCurrentIndex(4);
|
ui->toolBox->setCurrentIndex(4);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -510,6 +510,7 @@ private:
|
||||||
*/
|
*/
|
||||||
Draw::Draws mode;
|
Draw::Draws mode;
|
||||||
qint32 currentDrawIndex;
|
qint32 currentDrawIndex;
|
||||||
|
qint32 currentToolBoxIndex;
|
||||||
/**
|
/**
|
||||||
* @brief ToolBarOption
|
* @brief ToolBarOption
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue
Block a user