diff --git a/src/dialogs/dialogincrements.cpp b/src/dialogs/dialogincrements.cpp index 85416e2bb..f33dda500 100644 --- a/src/dialogs/dialogincrements.cpp +++ b/src/dialogs/dialogincrements.cpp @@ -55,13 +55,11 @@ DialogIncrements::DialogIncrements(VContainer *data, VDomDocument *doc, QWidget connect(ui->tableWidgetIncrement, &QTableWidget::cellChanged, this, &DialogIncrements::cellChanged); connect(ui->toolButtonAdd, &QPushButton::clicked, this, &DialogIncrements::clickedToolButtonAdd); - connect(ui->toolButtonRemove, &QPushButton::clicked, this, - &DialogIncrements::clickedToolButtonRemove); + connect(ui->toolButtonRemove, &QPushButton::clicked, this, &DialogIncrements::clickedToolButtonRemove); connect(this, &DialogIncrements::FullUpdateTree, this->doc, &VDomDocument::FullUpdateTree); connect(this, &DialogIncrements::haveLiteChange, this->doc, &VDomDocument::haveLiteChange); - connect(this->doc, &VDomDocument::FullUpdateFromFile, this, - &DialogIncrements::FullUpdateFromFile); + connect(this->doc, &VDomDocument::FullUpdateFromFile, this, &DialogIncrements::FullUpdateFromFile); ui->tabWidget->setCurrentIndex(0); } @@ -438,6 +436,7 @@ void DialogIncrements::cellChanged ( qint32 row, qint32 column ) data->ClearIncrementTable(); this->column = 2; emit FullUpdateTree(); + emit haveLiteChange(); } break; case 2: @@ -454,6 +453,7 @@ void DialogIncrements::cellChanged ( qint32 row, qint32 column ) domElement.setAttribute("base", value); this->column = 3; emit FullUpdateTree(); + emit haveLiteChange(); } else { @@ -471,6 +471,7 @@ void DialogIncrements::cellChanged ( qint32 row, qint32 column ) domElement.setAttribute("ksize", item->text().replace(",", ".").toDouble()); this->column = 4; emit FullUpdateTree(); + emit haveLiteChange(); } break; case 4: @@ -483,6 +484,7 @@ void DialogIncrements::cellChanged ( qint32 row, qint32 column ) domElement.setAttribute("kgrowth", item->text().replace(",", ".").toDouble()); this->column = 5; emit FullUpdateTree(); + emit haveLiteChange(); } break; case 5: diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index db7d69494..cdf55894d 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1092,8 +1092,8 @@ void MainWindow::ActionTable(bool checked) if (checked) { dialogTable = new DialogIncrements(pattern, doc, this); - connect(dialogTable, &DialogIncrements::DialogClosed, this, - &MainWindow::ClosedActionTable); + Q_CHECK_PTR(dialogTable); + connect(dialogTable, &DialogIncrements::DialogClosed, this, &MainWindow::ClosedActionTable); dialogTable->show(); } else @@ -1107,6 +1107,7 @@ void MainWindow::ClosedActionTable() { ui->actionTable->setChecked(false); delete dialogTable; + dialogTable = 0; } void MainWindow::ActionHistory(bool checked) diff --git a/src/tools/drawTools/vtoolsinglepoint.cpp b/src/tools/drawTools/vtoolsinglepoint.cpp index 8fbbd78f8..e56d7c3f8 100644 --- a/src/tools/drawTools/vtoolsinglepoint.cpp +++ b/src/tools/drawTools/vtoolsinglepoint.cpp @@ -121,6 +121,7 @@ QVariant VToolSinglePoint::itemChange(QGraphicsItem::GraphicsItemChange change, //I don't now why but signal does not work. doc->FullUpdateTree(); + emit toolhaveChange(); } } return QGraphicsItem::itemChange(change, value); diff --git a/src/tools/vabstracttool.cpp b/src/tools/vabstracttool.cpp index c88853368..8bb711086 100644 --- a/src/tools/vabstracttool.cpp +++ b/src/tools/vabstracttool.cpp @@ -237,7 +237,7 @@ void VAbstractTool::DeleteTool(QGraphicsItem *tool) scene->removeItem(tool);//remove form scene } doc->FullUpdateTree(); - //emit toolhaveChange();//set enabled save button + emit toolhaveChange();//set enabled save button } else {