PLC Fix scroll sync, data persistence, font defaults, copy/paste, and layout fixes

This commit is contained in:
Kellermorph
2026-08-06 07:33:39 +02:00
parent c1551c7477
commit 4f9474a05f
8 changed files with 452 additions and 87 deletions
+3 -2
View File
@@ -18,6 +18,7 @@
#include "partplctable.h"
#include "../../QPropertyUndoCommand/qpropertyundocommand.h"
#include "../../qetapp.h"
#include "../../QetGraphicsItemModeler/qetgraphicshandleritem.h"
#include "../../QetGraphicsItemModeler/qetgraphicshandlerutility.h"
#include "../../properties/elementdata.h"
@@ -302,7 +303,7 @@ void PartPlcTable::paint(QPainter *painter, const QStyleOptionGraphicsItem *opti
// Draw column headers
QFont header_font = plc_data.headerFont.family().isEmpty()
? painter->font() : plc_data.headerFont;
? QETApp::diagramTextsFont() : plc_data.headerFont;
header_font.setBold(true);
painter->setFont(header_font);
@@ -318,7 +319,7 @@ void PartPlcTable::paint(QPainter *painter, const QStyleOptionGraphicsItem *opti
// Draw IO rows
QFont cell_font = plc_data.cellFont.family().isEmpty()
? painter->font() : plc_data.cellFont;
? QETApp::diagramTextsFont() : plc_data.cellFont;
painter->setFont(cell_font);
int start_idx = block_starts.at(block);
int end_idx = (block + 1 < block_starts.size())