mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
Basic Shapes: XML export/import added.
Many files were changed, so debugging required. Minor Bug exists: If we export to xml first time, it is OK. But if we then add another shape and then export, then the new shape is not added in XML. Reason: UndoAction not implemented at present for basi shape addition. git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2888 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -461,6 +461,9 @@ void DiagramView::mousePressEvent(QMouseEvent *e) {
|
||||
rubber_band_origin = mapToScene(e -> pos());
|
||||
newItem = new QetShapeItem(rubber_band_origin, rubber_band_origin, QetShapeItem::Line, false);
|
||||
scene -> addItem(newItem);
|
||||
// le place a la position pos en gerant l'annulation
|
||||
//scene -> undoStack().push(new AddShapeCommand(scene, newItem, e->pos));
|
||||
//adjustSceneRect();
|
||||
break;
|
||||
case addingRectangle:
|
||||
rubber_band_origin = mapToScene(e -> pos());
|
||||
@@ -714,7 +717,7 @@ bool DiagramView::hasCopiableItems() {
|
||||
if (
|
||||
qgraphicsitem_cast<Element *>(qgi) ||
|
||||
qgraphicsitem_cast<IndependentTextItem *>(qgi) ||
|
||||
qgraphicsitem_cast<QetShapeItem *>(qgi) ||
|
||||
dynamic_cast<QetShapeItem *>(qgi) ||
|
||||
qgraphicsitem_cast<DiagramImageItem *>(qgi)
|
||||
) {
|
||||
return(true);
|
||||
@@ -733,7 +736,7 @@ bool DiagramView::hasDeletableItems() {
|
||||
qgraphicsitem_cast<Element *>(qgi) ||
|
||||
qgraphicsitem_cast<Conductor *>(qgi) ||
|
||||
qgraphicsitem_cast<IndependentTextItem *>(qgi) ||
|
||||
qgraphicsitem_cast<QetShapeItem *>(qgi) ||
|
||||
dynamic_cast<QetShapeItem *>(qgi) ||
|
||||
qgraphicsitem_cast<DiagramImageItem *>(qgi)
|
||||
) {
|
||||
return(true);
|
||||
|
||||
Reference in New Issue
Block a user