mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-08-13 10:04:13 +02:00
Merge pull request #703 from Kellermorph/fix-plc-warnings
Compile-warnings have been fixed as requested.
This commit is contained in:
@@ -474,9 +474,6 @@ void ElementPropertiesEditorWidget::populateSlaveGroupsTable()
|
|||||||
int row_count = ui->max_slaves_checkbox->isChecked()
|
int row_count = ui->max_slaves_checkbox->isChecked()
|
||||||
? ui->max_slaves_spinbox->value() : 0;
|
? 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
|
// Adjust the groups list to match the spinbox value
|
||||||
while (m_data.m_slave_contact_groups.size() < row_count) {
|
while (m_data.m_slave_contact_groups.size() < row_count) {
|
||||||
ElementData::SlaveContactGroup group;
|
ElementData::SlaveContactGroup group;
|
||||||
@@ -1160,6 +1157,7 @@ void ElementPropertiesEditorWidget::plcAddRow()
|
|||||||
void ElementPropertiesEditorWidget::plcTerminalCountChanged(int row, int count)
|
void ElementPropertiesEditorWidget::plcTerminalCountChanged(int row, int count)
|
||||||
{
|
{
|
||||||
Q_UNUSED(row)
|
Q_UNUSED(row)
|
||||||
|
Q_UNUSED(count)
|
||||||
if (!m_plc_terminal_table)
|
if (!m_plc_terminal_table)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
@@ -1455,7 +1455,6 @@ void CrossRefItem::drawAsPlcTable(QPainter &painter)
|
|||||||
painter.drawRect(bg_rect);
|
painter.drawRect(bg_rect);
|
||||||
|
|
||||||
// Draw header row
|
// Draw header row
|
||||||
qreal x_offset = 0;
|
|
||||||
|
|
||||||
for (int block = 0; block < block_count; ++block) {
|
for (int block = 0; block < block_count; ++block) {
|
||||||
qreal block_x = block * (col_widths.value(visible_cols.first(), 30) * visible_cols.size() + 3);
|
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
|
// Preserve terminal data by looking up original IO via address
|
||||||
if (addr_to_orig_idx.contains(io.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.terminalCount = orig_io.terminalCount;
|
||||||
io.terminals = orig_io.terminals;
|
io.terminals = orig_io.terminals;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user