mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
Elements panel now avoid marking freshly integrated elements as unused.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.3@1713 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -984,6 +984,15 @@ QList<ElementsLocation> GenericPanel::elementIntegrated(QETProject *project, con
|
||||
if (added_locations.count()) {
|
||||
refreshElementsCategory(loc);
|
||||
}
|
||||
|
||||
// Since we have refreshed the panel before the element is actually used by
|
||||
// the diagram, it will appear as unused; we force it as unused.
|
||||
// FIXME a better solution would be to get warned when an element gets used
|
||||
// or unused.
|
||||
if (QTreeWidgetItem *integrated_element_qtwi = itemForElementsLocation(location)) {
|
||||
integrated_element_qtwi -> setToolTip(0, location.toString());
|
||||
integrated_element_qtwi -> setBackground(0, QBrush());
|
||||
}
|
||||
return(added_locations);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user