Refactor specification handling in DocumentSettingsDialog and PDFController. Introduced primary application field for document types, updated export messages for consistency, and improved page number handling in specifications. Cleaned up unnecessary code in preview widgets.
This commit is contained in:
@@ -1339,6 +1339,29 @@ void DocumentEditWidget::onRemoveRow()
|
||||
return;
|
||||
}
|
||||
|
||||
// Проверяем, является ли процессор SpecificationProcessor
|
||||
SpecificationProcessor *specProcessor = qobject_cast<SpecificationProcessor*>(m_processor);
|
||||
if (specProcessor) {
|
||||
// Проверяем, можно ли удалить эту строку
|
||||
if (m_controller && m_controller->specificationTableModel()) {
|
||||
if (!m_controller->specificationTableModel()->canEditRow(row)) {
|
||||
qDebug() << "DocumentEditWidget::onRemoveRow: Строка" << row << "не может быть удалена (заголовок или автоматически сгенерированная)";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
qDebug() << "DocumentEditWidget::onRemoveRow: Удаляем строку" << row;
|
||||
|
||||
// Получаем контроллер и удаляем строку
|
||||
if (m_controller && m_controller->specificationController()) {
|
||||
m_controller->specificationController()->removeRow(row);
|
||||
qDebug() << "DocumentEditWidget::onRemoveRow: Строка удалена через SpecificationController";
|
||||
} else {
|
||||
qDebug() << "DocumentEditWidget::onRemoveRow: SpecificationController недоступен";
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// Проверяем, является ли процессор VedomostProcessor
|
||||
VedomostProcessor *vedomostProcessor = qobject_cast<VedomostProcessor*>(m_processor);
|
||||
if (vedomostProcessor) {
|
||||
|
||||
Reference in New Issue
Block a user