mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-08-13 10:04:13 +02:00
Fix-PLC-Warnings
This commit is contained in:
@@ -474,9 +474,6 @@ void ElementPropertiesEditorWidget::populateSlaveGroupsTable()
|
||||
int row_count = ui->max_slaves_checkbox->isChecked()
|
||||
? ui->max_slaves_spinbox->value() : 0;
|
||||
|
||||
// If we have existing groups, use their count (up to max_slaves)
|
||||
int existing_groups = m_data.m_slave_contact_groups.size();
|
||||
|
||||
// Adjust the groups list to match the spinbox value
|
||||
while (m_data.m_slave_contact_groups.size() < row_count) {
|
||||
ElementData::SlaveContactGroup group;
|
||||
@@ -1160,6 +1157,7 @@ void ElementPropertiesEditorWidget::plcAddRow()
|
||||
void ElementPropertiesEditorWidget::plcTerminalCountChanged(int row, int count)
|
||||
{
|
||||
Q_UNUSED(row)
|
||||
Q_UNUSED(count)
|
||||
if (!m_plc_terminal_table)
|
||||
return;
|
||||
|
||||
|
||||
@@ -1455,7 +1455,6 @@ void CrossRefItem::drawAsPlcTable(QPainter &painter)
|
||||
painter.drawRect(bg_rect);
|
||||
|
||||
// Draw header row
|
||||
qreal x_offset = 0;
|
||||
|
||||
for (int block = 0; block < block_count; ++block) {
|
||||
qreal block_x = block * (col_widths.value(visible_cols.first(), 30) * visible_cols.size() + 3);
|
||||
|
||||
@@ -1034,7 +1034,7 @@ void MasterPropertiesWidget::plcUpdateDisplaySettings()
|
||||
|
||||
// Preserve terminal data by looking up original IO via address
|
||||
if (addr_to_orig_idx.contains(io.address)) {
|
||||
const auto &orig_io = ed.plcMasterData().ios.at(addr_to_orig_idx.value(io.address));
|
||||
const auto orig_io = ed.plcMasterData().ios.at(addr_to_orig_idx.value(io.address));
|
||||
io.terminalCount = orig_io.terminalCount;
|
||||
io.terminals = orig_io.terminals;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user