mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-29 15:10:52 +01:00
Amelioration de la classe DiagramContent
Modifications pour corriger quelques regressions git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@212 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
15
diagram.cpp
15
diagram.cpp
@@ -618,10 +618,25 @@ DiagramContent Diagram::content() const {
|
||||
@return le contenu selectionne du schema.
|
||||
*/
|
||||
DiagramContent Diagram::selectedContent() {
|
||||
invalidateMovedElements();
|
||||
DiagramContent dc;
|
||||
dc.elements = elementsToMove().toList();
|
||||
dc.textFields = textsToMove().toList();
|
||||
dc.conductorsToMove = conductorsToMove().toList();
|
||||
dc.conductorsToUpdate = conductorsToUpdate();
|
||||
|
||||
// recupere les conducteurs selectionnes isoles (= non deplacables mais supprimables)
|
||||
foreach(QGraphicsItem *qgi, items()) {
|
||||
if (Conductor *c = qgraphicsitem_cast<Conductor *>(qgi)) {
|
||||
if (
|
||||
c -> isSelected() &&\
|
||||
!c -> terminal1 -> parentItem() -> isSelected() &&\
|
||||
!c -> terminal2 -> parentItem() -> isSelected()
|
||||
) {
|
||||
dc.otherConductors << c;
|
||||
}
|
||||
}
|
||||
}
|
||||
invalidateMovedElements();
|
||||
return(dc);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user