Merge branch 'master' into master-modernize-signal-slot

This commit is contained in:
Andre Rummler
2026-08-09 11:30:27 +02:00
3 changed files with 22 additions and 3 deletions
+10 -2
View File
@@ -26,6 +26,7 @@
#include "../numerotationcontext.h"
#include "../numerotationcontextcommands.h"
#include "ui_autonumberingdockwidget.h"
#include "../../undocommand/changetitleblockcommand.h"
#include <QComboBox>
#include <QLineEdit>
@@ -347,10 +348,17 @@ void AutoNumberingDockWidget::on_m_folio_cb_activated(int) {
ip.folio = "%id/%total";
m_project->setDefaultTitleBlockProperties(ip);
}
if (m_project_view && m_project_view->currentDiagram()) {
m_project_view->currentDiagram()->diagram()->border_and_titleblock.importTitleBlock(ip);
Diagram *diagram = m_project_view->currentDiagram()->diagram();
TitleBlockProperties old_properties = diagram->border_and_titleblock.exportTitleBlock();
TitleBlockProperties new_properties = old_properties;
new_properties.auto_page_num = ip.auto_page_num;
new_properties.folio = ip.folio;
if (new_properties != old_properties)
diagram->undoStack().push(new ChangeTitleBlockCommand(diagram, old_properties, new_properties));
}
emit(folioAutoNumChanged(current_autonum));
emit(folioAutoNumChanged(current_autonum));
refreshRow(AutoNumCategory::Folio);
}
-1
View File
@@ -244,7 +244,6 @@ class QETProject : public QObject
/// rebuild their rule lists; this one just says "re-read me".
void autoNumContextUpdated();
void folioAutoNumRemoved();
void folioAutoNumChanged(QString);
void defaultTitleBlockPropertiesChanged();
void conductorAutoNumChanged();
@@ -503,6 +503,10 @@ void ProjectAutoNumConfigPage::removeContextElement()
return;
m_project->removeElementAutoNum (m_saw_element->contextComboBox()->currentText());
m_saw_element->contextComboBox()->removeItem (m_saw_element->contextComboBox()->currentIndex());
// removeItem() removes the current selection programmatically but
// textActivated() does not react to (by design, see buildConnections()).
// Refresh the displayed pattern explicitly so it matches the new selection.
updateContextElement(m_saw_element->contextComboBox()->currentText());
}
/**
@@ -690,6 +694,10 @@ void ProjectAutoNumConfigPage::removeContextConductor()
if ( m_saw_conductor->contextComboBox()-> currentText() == tr("Nom de la nouvelle numérotation") ) return;
m_project -> removeConductorAutoNum (m_saw_conductor->contextComboBox()-> currentText() );
m_saw_conductor->contextComboBox()-> removeItem (m_saw_conductor->contextComboBox()-> currentIndex() );
// removeItem() removes the current selection programmatically but
// textActivated() does not react to (by design, see buildConnections()).
// Refresh the displayed pattern explicitly so it matches the new selection.
updateContextConductor(m_saw_conductor->contextComboBox()->currentText());
project()->conductorAutoNumRemoved();
}
@@ -703,6 +711,10 @@ void ProjectAutoNumConfigPage::removeContextFolio()
if ( m_saw_folio->contextComboBox() -> currentText() == tr("Nom de la nouvelle numérotation") ) return;
m_project -> removeFolioAutoNum (m_saw_folio->contextComboBox() -> currentText() );
m_saw_folio->contextComboBox() -> removeItem (m_saw_folio->contextComboBox() -> currentIndex() );
// removeItem() removes the current selection programmatically but
// textActivated() does not react to (by design, see buildConnections()).
// Refresh the displayed pattern explicitly so it matches the new selection.
updateContextFolio(m_saw_folio->contextComboBox()->currentText());
project()->folioAutoNumRemoved();
}