mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-17 19:34:13 +02:00
Terminal sections: show the AWG equivalent in the section lists
Linux build and tests / Build and test (Qt 6, Debug) (push) Failing after 1m42s
Linux build and tests / Build and test (Qt 6, Debug) (push) Failing after 1m42s
The section combo boxes of the terminal strip editor and of the element editor now show the nearest AWG / kcmil size next to the section in mm2, for example "2.5 mm² (AWG 14)". The correspondence is approximate (the two systems don't have the same steps) and is stored in TerminalCatalog::awgForSection(). The stored value is unchanged (terminal_section, in mm2).
This commit is contained in:
@@ -440,7 +440,9 @@ void ElementPropertiesEditorWidget::populateTerminalSizeCombos(double section, d
|
||||
ui->m_terminal_section_cb->clear();
|
||||
ui->m_terminal_section_cb->addItem(tr("None (default)"), 0.0);
|
||||
for (const auto section_ : TerminalCatalog::sections()) {
|
||||
ui->m_terminal_section_cb->addItem(tr("%1 mm²").arg(QLocale().toString(section_, 'g', 6)), section_);
|
||||
ui->m_terminal_section_cb->addItem(
|
||||
TerminalCatalog::sectionText(section_, tr("%1 mm²").arg(QLocale().toString(section_, 'g', 6))),
|
||||
section_);
|
||||
}
|
||||
setComboValue(ui->m_terminal_section_cb, section, tr(" mm²"));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user