Conductor autonumerotation: Remove one autonum per diagram and add global autonums for the project.

several diagram can share the same autonumerotation.
This is first step, need to be improved and readd some feature (disabled for first step).


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3239 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2014-07-31 10:02:33 +00:00
parent d1730f39bd
commit 6fce7010f8
23 changed files with 643 additions and 278 deletions

View File

@@ -23,9 +23,9 @@
#include "element.h"
#include "diagram.h"
#include "diagramcommands.h"
#include "conductorautonumerotation.h"
#include "qetdiagrameditor.h"
#include "terminal.h"
#include "conductorautonumerotation.h"
#define PR(x) qDebug() << #x " = " << x;
bool Conductor::pen_and_brush_initialized = false;
@@ -984,7 +984,7 @@ bool Conductor::fromXml(QDomElement &e) {
segments_y << segment_length;
}
}
// s'il n'y a pas de segments, on renvoie true
if (!segments_x.size()) return(true);
// les longueurs recueillies doivent etre coherentes avec les positions des bornes
@@ -1320,11 +1320,6 @@ QSet<Conductor *> Conductor::relatedConductors() const {
return(other_conductors);
}
/**
* @param t_list terminaux a ne pas inclure dans la recherche
* @return les conducteurs avec lesquels ce conducteur partage
* le meme potentiel electrique a l'exception de lui même
*/
/**
* @brief Conductor::relatedPotentialConductors
* Return all conductors at the same potential of this conductor, this conductor isn't
@@ -1340,9 +1335,8 @@ QSet<Conductor *> Conductor::relatedPotentialConductors(QList <Terminal *> *t_li
}
QSet <Conductor *> other_conductors;
// QList <Terminal *> this_terminal{terminal1, terminal2};
QList <Terminal *> this_terminal;
this_terminal << terminal1 << terminal2;
this_terminal << terminal1 << terminal2;
// Return all conductor of terminal 1 and 2
foreach (Terminal *terminal, this_terminal) {