Little fixes.

--HG--
branch : develop
This commit is contained in:
dismine 2014-02-07 18:44:12 +02:00
parent 379b7d32d1
commit d996599829
4 changed files with 11 additions and 7 deletions

View File

@ -55,13 +55,11 @@ DialogIncrements::DialogIncrements(VContainer *data, VDomDocument *doc, QWidget
connect(ui->tableWidgetIncrement, &QTableWidget::cellChanged, this, &DialogIncrements::cellChanged); connect(ui->tableWidgetIncrement, &QTableWidget::cellChanged, this, &DialogIncrements::cellChanged);
connect(ui->toolButtonAdd, &QPushButton::clicked, this, &DialogIncrements::clickedToolButtonAdd); connect(ui->toolButtonAdd, &QPushButton::clicked, this, &DialogIncrements::clickedToolButtonAdd);
connect(ui->toolButtonRemove, &QPushButton::clicked, this, connect(ui->toolButtonRemove, &QPushButton::clicked, this, &DialogIncrements::clickedToolButtonRemove);
&DialogIncrements::clickedToolButtonRemove);
connect(this, &DialogIncrements::FullUpdateTree, this->doc, &VDomDocument::FullUpdateTree); connect(this, &DialogIncrements::FullUpdateTree, this->doc, &VDomDocument::FullUpdateTree);
connect(this, &DialogIncrements::haveLiteChange, this->doc, &VDomDocument::haveLiteChange); connect(this, &DialogIncrements::haveLiteChange, this->doc, &VDomDocument::haveLiteChange);
connect(this->doc, &VDomDocument::FullUpdateFromFile, this, connect(this->doc, &VDomDocument::FullUpdateFromFile, this, &DialogIncrements::FullUpdateFromFile);
&DialogIncrements::FullUpdateFromFile);
ui->tabWidget->setCurrentIndex(0); ui->tabWidget->setCurrentIndex(0);
} }
@ -438,6 +436,7 @@ void DialogIncrements::cellChanged ( qint32 row, qint32 column )
data->ClearIncrementTable(); data->ClearIncrementTable();
this->column = 2; this->column = 2;
emit FullUpdateTree(); emit FullUpdateTree();
emit haveLiteChange();
} }
break; break;
case 2: case 2:
@ -454,6 +453,7 @@ void DialogIncrements::cellChanged ( qint32 row, qint32 column )
domElement.setAttribute("base", value); domElement.setAttribute("base", value);
this->column = 3; this->column = 3;
emit FullUpdateTree(); emit FullUpdateTree();
emit haveLiteChange();
} }
else else
{ {
@ -471,6 +471,7 @@ void DialogIncrements::cellChanged ( qint32 row, qint32 column )
domElement.setAttribute("ksize", item->text().replace(",", ".").toDouble()); domElement.setAttribute("ksize", item->text().replace(",", ".").toDouble());
this->column = 4; this->column = 4;
emit FullUpdateTree(); emit FullUpdateTree();
emit haveLiteChange();
} }
break; break;
case 4: case 4:
@ -483,6 +484,7 @@ void DialogIncrements::cellChanged ( qint32 row, qint32 column )
domElement.setAttribute("kgrowth", item->text().replace(",", ".").toDouble()); domElement.setAttribute("kgrowth", item->text().replace(",", ".").toDouble());
this->column = 5; this->column = 5;
emit FullUpdateTree(); emit FullUpdateTree();
emit haveLiteChange();
} }
break; break;
case 5: case 5:

View File

@ -1092,8 +1092,8 @@ void MainWindow::ActionTable(bool checked)
if (checked) if (checked)
{ {
dialogTable = new DialogIncrements(pattern, doc, this); dialogTable = new DialogIncrements(pattern, doc, this);
connect(dialogTable, &DialogIncrements::DialogClosed, this, Q_CHECK_PTR(dialogTable);
&MainWindow::ClosedActionTable); connect(dialogTable, &DialogIncrements::DialogClosed, this, &MainWindow::ClosedActionTable);
dialogTable->show(); dialogTable->show();
} }
else else
@ -1107,6 +1107,7 @@ void MainWindow::ClosedActionTable()
{ {
ui->actionTable->setChecked(false); ui->actionTable->setChecked(false);
delete dialogTable; delete dialogTable;
dialogTable = 0;
} }
void MainWindow::ActionHistory(bool checked) void MainWindow::ActionHistory(bool checked)

View File

@ -121,6 +121,7 @@ QVariant VToolSinglePoint::itemChange(QGraphicsItem::GraphicsItemChange change,
//I don't now why but signal does not work. //I don't now why but signal does not work.
doc->FullUpdateTree(); doc->FullUpdateTree();
emit toolhaveChange();
} }
} }
return QGraphicsItem::itemChange(change, value); return QGraphicsItem::itemChange(change, value);

View File

@ -237,7 +237,7 @@ void VAbstractTool::DeleteTool(QGraphicsItem *tool)
scene->removeItem(tool);//remove form scene scene->removeItem(tool);//remove form scene
} }
doc->FullUpdateTree(); doc->FullUpdateTree();
//emit toolhaveChange();//set enabled save button emit toolhaveChange();//set enabled save button
} }
else else
{ {