version 2.22.0
blockview small code clean add PIValueTree to BLockItem, BlockItemPin and BlockBusItem add QAD::CursorOverrider::restore() fix QCodeEdit escape key while block selection
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include "blockview.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <piqt.h>
|
||||
|
||||
|
||||
BlockBusItem::BlockBusItem(bool temp): QGraphicsObject(), PropertyStorage() {
|
||||
@@ -369,8 +370,9 @@ void BlockBusItem::clearBusState() {
|
||||
|
||||
QByteArray BlockBusItem::save() const {
|
||||
ChunkStream cs;
|
||||
cs << cs.chunk(1, busType()) << cs.chunk(2, busName()) << cs.chunk(3, width()) << cs.chunk(4, pen()) << cs.chunk(5, brush())
|
||||
<< cs.chunk(6, pol) << cs.chunk(7, segments) << cs.chunk(8, props) << cs.chunk(9, im_bus_scale) << cs.chunk(10, im_end_scale);
|
||||
cs.add(1, busType()).add(2, busName()).add(3, width()).add(4, pen()).add(5, brush());
|
||||
cs.add(6, pol).add(7, segments).add(8, props).add(9, im_bus_scale).add(10, im_end_scale);
|
||||
cs.add(11, piqSerialize(value_tree));
|
||||
return cs.data();
|
||||
}
|
||||
|
||||
@@ -391,6 +393,7 @@ void BlockBusItem::load(const QByteArray & data) {
|
||||
case 8: props = cs.getData<QList<BlockItem::Property>>(); break;
|
||||
case 9: im_bus_scale = cs.getData<double>(); break;
|
||||
case 10: im_end_scale = cs.getData<double>(); break;
|
||||
case 11: value_tree = piqDeserialize<PIValueTree>(cs.getData<QByteArray>()); break;
|
||||
}
|
||||
}
|
||||
updateGeometry();
|
||||
|
||||
Reference in New Issue
Block a user