Conductor : remove the possibility to have different texts on the same potential

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4150 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2015-08-22 13:18:20 +00:00
parent 185d6adfdd
commit 3336237a3f
4 changed files with 73 additions and 63 deletions

View File

@@ -114,22 +114,25 @@ void ConductorAutoNumerotation::applyText(QString t)
* @brief ConductorAutoNumerotation::numeratePotential
* Numerate a conductor on an existing potential
*/
void ConductorAutoNumerotation::numeratePotential() {
void ConductorAutoNumerotation::numeratePotential()
{
QStringList strl;
foreach (const Conductor *cc, conductor_list) strl<<(cc->text());
//the texts is identicals
if (QET::eachStrIsEqual(strl)) {
if (QET::eachStrIsEqual(strl))
{
ConductorProperties cp = conductor_ -> properties();
cp.text = strl.at(0);
conductor_ -> setProperties(cp);
conductor_ -> setText(strl.at(0));
}
//the texts isn't identicals
else {
//the texts isn't identicals
else
{
PotentialTextsDialog ptd (conductor_, conductor_ -> diagramEditor());
if (ptd.exec() == QDialog::Accepted) {
applyText(ptd.selectedText());
}
ptd.exec();
applyText(ptd.selectedText());
}
}