[qet] [3630] Master element : bug fix |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/qet Archives
]
Revision: 3630
Author: blacksun
Date: 2015-01-26 23:32:55 +0100 (Mon, 26 Jan 2015)
Log Message:
-----------
Master element : bug fix
Modified Paths:
--------------
trunk/dev_doc/enum_type_of_QGraphicsItem
trunk/sources/qetgraphicsitem/masterelement.cpp
Modified: trunk/dev_doc/enum_type_of_QGraphicsItem
===================================================================
--- trunk/dev_doc/enum_type_of_QGraphicsItem 2015-01-26 09:06:17 UTC (rev 3629)
+++ trunk/dev_doc/enum_type_of_QGraphicsItem 2015-01-26 22:32:55 UTC (rev 3630)
@@ -1,4 +1,5 @@
Type = UserType + ???
+###DIAGRAM EDITOR###
Element + 1000
Conductor + 1001
Terminal + 1002
@@ -10,3 +11,13 @@
QetShapItem + 1008
crossRefItem + 1009
ElementPrimitiveDecorator + 2200
+
+###ELEMENT EDITOR###
+part arc + 1101
+part ellipse + 1103
+part Line + 1104
+part polygon + 1105
+part terminal + 1106
+part text + 1107
+part text field + 1108
+part rectangle + 1109
Modified: trunk/sources/qetgraphicsitem/masterelement.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/masterelement.cpp 2015-01-26 09:06:17 UTC (rev 3629)
+++ trunk/sources/qetgraphicsitem/masterelement.cpp 2015-01-26 22:32:55 UTC (rev 3630)
@@ -90,7 +90,7 @@
elmt -> unlinkElement (this);
elmt -> setHighlighted (false);
- //update the graphics cross ref
+ //update the graphics cross ref
disconnect(elmt, SIGNAL(xChanged()), cri_, SLOT(updateLabel()));
disconnect(elmt, SIGNAL(yChanged()), cri_, SLOT(updateLabel()));
@@ -149,10 +149,14 @@
* Check if Xref item must be displayed, if not, delete it.
* If Xref item is deleted or already not used (nullptr) return true;
* Else return false if Xref item is used
+ * NOTICE : Xref can display nothing but not be deleted so far.
+ * For exemple, if Xref is display has cross, only power contact are linked and
+ * option show power contact is disable, the cross isn't draw.
* @return
*/
bool MasterElement::aboutDeleteXref() {
if(!cri_) return true;
+ if(!linkedElements().isEmpty()) return false;
if (cri_ -> boundingRect().isNull()) {
delete cri_;