diff --git a/sources/projectconfigpages.cpp b/sources/projectconfigpages.cpp
index 8ba62fe7c..7a8a99ab6 100644
--- a/sources/projectconfigpages.cpp
+++ b/sources/projectconfigpages.cpp
@@ -513,7 +513,7 @@ void ProjectAutoNumConfigPage::saveContext_element() {
// With the the name "No name"
if (m_context_cb_element -> currentText() == tr("Nom de la nouvelle numérotation")) {
project_->addElementAutoNum (tr("Sans nom"), m_saw_element -> toNumContext());
- project()->addElementAutoNumFormula (m_context_cb_element->currentText(), m_saw_element->elementFormula()); //add hash
+ project()->addElementAutoNumFormula (tr("Sans nom"), m_saw_element->elementFormula()); //add hash
project()->addElementAutoNumCurrentFormula (m_saw_element->elementFormula()); //add last added element formula to current formula
m_context_cb_element -> addItem(tr("Sans nom"));
}
diff --git a/sources/qetgraphicsitem/element.cpp b/sources/qetgraphicsitem/element.cpp
index 4da4881dd..e1aa44210 100644
--- a/sources/qetgraphicsitem/element.cpp
+++ b/sources/qetgraphicsitem/element.cpp
@@ -689,7 +689,6 @@ void Element::assignSeq() {
QHash hash = diagram()->project()->elementAutoNum_2();
QString formula_name = hash.key(formula);
QString label = dc["label"].toString();
- qDebug() << "Label" << label;
NumerotationContext nc = diagram()->project()->elementAutoNum(formula_name);
NumerotationContextCommands ncc (nc);
if (!nc.isEmpty()) {
@@ -706,7 +705,8 @@ void Element::assignSeq() {
int count = 1;
for (int i = 0; i < nc.size(); i++) {
if (nc.itemAt(i).at(0) == "ten") {
- label.replace("%seqt_" + QString::number(count), QString::number(nc.itemAt(i).at(1).toInt()));
+ QString number = QString("%1").arg(nc.itemAt(i).at(1).toInt(), 2, 10, QChar('0'));
+ label.replace("%seqt_" + QString::number(count), number);
count++;
}
}
@@ -715,7 +715,8 @@ void Element::assignSeq() {
int count = 1;
for (int i = 0; i < nc.size(); i++) {
if (nc.itemAt(i).at(0) == "hundred") {
- label.replace("%seqh_" + QString::number(count), QString::number(nc.itemAt(i).at(1).toInt()));
+ QString number = QString("%1").arg(nc.itemAt(i).at(1).toInt(), 3, 10, QChar('0'));
+ label.replace("%seqh_" + QString::number(count), number);
count++;
}
}