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->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:

View file

@ -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)

View file

@ -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);

View file

@ -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
{