%seq is not hardcoded anymore. Autonums with the same formula are not conflicted anymore.

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4577 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
dfochi
2016-07-14 17:16:14 +00:00
parent df1db0adc3
commit 38b69e9f2f
9 changed files with 119 additions and 35 deletions

View File

@@ -148,6 +148,7 @@ void AutoNumberingDockWidget::setActive() {
ui->m_conductor_cb->setCurrentIndex(conductor_index);
//Element
QString current_element_autonum = project_->elementCurrentAutoNum();
QString element_formula = project_->elementAutoNumFormula();
QString active_element_autonum = project_->elementAutoNum_2().key(element_formula);
int el_index = ui->m_element_cb->findText(active_element_autonum);
@@ -209,9 +210,10 @@ void AutoNumberingDockWidget::elementAutoNumChanged() {
*/
void AutoNumberingDockWidget::on_m_element_cb_activated(int) {
QString current_autonum = ui->m_element_cb->currentText();
QString current_formula = project_->elementAutoNumFormula(current_autonum);
if (current_formula!=NULL)
project_->setElementAutoNumCurrentFormula(current_formula);
QString current_formula = project_->elementAutoNumFormula();
if (current_formula!=NULL) {
project_->setElementAutoNumCurrentFormula(current_formula, current_autonum);
}
}
/**

View File

@@ -201,6 +201,14 @@ void SelectAutonumW::on_buttonBox_clicked(QAbstractButton *button) {
};
}
/**
* @brief SelectAutonumW::applyEnableOnContextChanged
* enable/disable the apply button after changing the autonum name
*/
void SelectAutonumW::applyEnableOnContextChanged(QString) {
applyEnable(true);
}
/**
* @brief SelectAutonumW::applyEnable
* enable/disable the apply button

View File

@@ -48,6 +48,9 @@ class SelectAutonumW : public QWidget
void applyPressed();
//SLOT
public slots:
void applyEnableOnContextChanged(QString);
private slots:
void on_add_button_clicked();
void on_remove_button_clicked();