mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-01-25 03:19:58 +01:00
%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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user