[qet] qet/qet: [5314] Backport commit 5307, 5311, 5312

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 5314
Author:   scorpio810
Date:     2018-04-08 06:05:18 +0200 (Sun, 08 Apr 2018)
Log Message:
-----------
Backport commit 5307, 5311, 5312
Update changelog 

Modified Paths:
--------------
    branches/0.60/ChangeLog
    branches/0.60/elements/10_electric/10_allpole/114_connections/combine.elmt
    branches/0.60/elements/10_electric/10_allpole/114_connections/corner.elmt
    branches/0.60/elements/10_electric/10_allpole/114_connections/cross.elmt
    branches/0.60/elements/10_electric/10_allpole/114_connections/jump.elmt
    branches/0.60/elements/10_electric/10_allpole/114_connections/qet_directory
    branches/0.60/elements/10_electric/10_allpole/114_connections/splice.elmt
    branches/0.60/elements/10_electric/10_allpole/114_connections/thruleft.elmt
    branches/0.60/elements/10_electric/10_allpole/114_connections/thruright.elmt
    branches/0.60/sources/qetgraphicsitem/conductor.cpp
    branches/0.60/sources/qetgraphicsitem/terminal.cpp
    branches/0.60/sources/qetgraphicsitem/terminal.h

Modified: branches/0.60/ChangeLog
===================================================================
--- branches/0.60/ChangeLog	2018-04-08 03:38:53 UTC (rev 5313)
+++ branches/0.60/ChangeLog	2018-04-08 04:05:18 UTC (rev 5314)
@@ -1,3 +1,19 @@
+====== ChangeLog from 0.6 to 0.61 ======
+
+* Backport HiDPI fix.
+* Backport commit 5284 : Fix bug N° 157.
+* Backport commit 5307 : Function for search conductor at the same potential.
+When the search function is searching in a terminal element, they search only for the first terminal found, no matter if the terminal element have more than two terminals.
+So the list of conductors at the same potential is missing some conductors.
+This commit fix it, now the search function search for every terminals of a terminal element 
+* Backport commit 5311, 5312 : elements connections change propertie to terminal, fixed by commit svn 5307 
+
+
+
+
+
+
+
 ====== ChangeLog from 0.5 to 0.6 ======
 In the official collection, there are now 4106 elements, and 539 categoris for a total of 4645 files
 

Modified: branches/0.60/elements/10_electric/10_allpole/114_connections/combine.elmt
===================================================================
--- branches/0.60/elements/10_electric/10_allpole/114_connections/combine.elmt	2018-04-08 03:38:53 UTC (rev 5313)
+++ branches/0.60/elements/10_electric/10_allpole/114_connections/combine.elmt	2018-04-08 04:05:18 UTC (rev 5314)
@@ -1,21 +1,25 @@
-<definition type="element" height="20" orientation="dyyy" version="0.5" link_type="simple" hotspot_y="4" width="30" hotspot_x="11">
-    <uuid uuid="{8ef9d490-8db2-450a-ab89-22d2b35c01ed}"/>
+<definition hotspot_x="11" hotspot_y="4" version="0.70" type="element" height="20" orientation="dyyy" link_type="terminal" width="30">
+    <uuid uuid="{141e7e1e-4f7f-456d-9f04-52c32109b969}"/>
     <names>
+        <name lang="en">Combine</name>
+        <name lang="fr">Jonction</name>
+        <name lang="es">Unión</name>
         <name lang="it">Collegamento</name>
-        <name lang="en">Combine</name>
+        <name lang="pl">Połączenie 1</name>
+        <name lang="ar">وصلة</name>
         <name lang="ru">Соединение</name>
-        <name lang="pl">Połączenie 1</name>
-        <name lang="fr">Jonction</name>
         <name lang="cs">Spoj</name>
-		<name lang="es">Unión</name>
     </names>
+    <elementInformations/>
     <informations></informations>
     <description>
-        <line y2="0" style="line-style:normal;line-weight:normal;filling:none;color:black" length1="1.5" x1="7" y1="0" end2="none" x2="1" antialias="false" end1="none" length2="1.5"/>
-        <input x="2" y="13.5" size="1" tagg="label" rotate="true" text="_"/>
-        <line y2="0" style="line-style:normal;line-weight:normal;filling:none;color:black" length1="1.5" x1="0" y1="6" end2="none" x2="6" antialias="false" end1="none" length2="1.5"/>
-        <terminal orientation="w" x="-4" y="0"/>
-        <terminal orientation="s" x="0" y="10"/>
-        <terminal orientation="e" x="10" y="0"/>
+        <line end2="none" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="0" antialias="false" x1="7" length1="1.5" x2="1" y2="0" length2="1.5" end1="none"/>
+        <dynamic_text text_from="UserText" y="8.5" uuid="{43af2b14-2822-4ba2-988b-bda2005f69fd}" x="2" frame="false" z="2" rotation="0" text_width="-1" font_size="1">
+            <text>_</text>
+        </dynamic_text>
+        <line end2="none" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="6" antialias="false" x1="0" length1="1.5" x2="6" y2="0" length2="1.5" end1="none"/>
+        <terminal y="0" x="-4" orientation="w"/>
+        <terminal y="10" x="0" orientation="s"/>
+        <terminal y="0" x="10" orientation="e"/>
     </description>
 </definition>

Modified: branches/0.60/elements/10_electric/10_allpole/114_connections/corner.elmt
===================================================================
--- branches/0.60/elements/10_electric/10_allpole/114_connections/corner.elmt	2018-04-08 03:38:53 UTC (rev 5313)
+++ branches/0.60/elements/10_electric/10_allpole/114_connections/corner.elmt	2018-04-08 04:05:18 UTC (rev 5314)
@@ -1,18 +1,22 @@
-<definition type="element" height="20" orientation="dyyy" version="0.5" link_type="simple" hotspot_y="7" width="20" hotspot_x="11">
-    <uuid uuid="{2c6c492e-8d8e-402e-a449-0cf5a7462ced}"/>
+<definition hotspot_y="7" width="20" orientation="dyyy" type="element" height="20" version="0.70" hotspot_x="11" link_type="terminal">
+    <uuid uuid="{2d505b61-db0f-4784-9b9c-189366058272}"/>
     <names>
+        <name lang="es">Esquina</name>
         <name lang="en">Corner</name>
-        <name lang="it">Angolo</name>
+        <name lang="cs">Roh</name>
+        <name lang="fr">Coin</name>
         <name lang="ru">Угол</name>
-        <name lang="fr">Coin</name>
         <name lang="pl">Narożnik</name>
-        <name lang="cs">Roh</name>
-		<name lang="es">Esquina</name>
+        <name lang="ar">ركن</name>
+        <name lang="it">Angolo</name>
     </names>
+    <elementInformations/>
     <informations></informations>
     <description>
-        <input x="-0.5" y="-0.45" size="1" tagg="label" rotate="true" text="_"/>
-        <terminal orientation="s" x="0" y="4"/>
-        <terminal orientation="w" x="-4" y="0"/>
+        <dynamic_text rotation="0" x="-0.5" y="-5.45" uuid="{9b8dd22d-096a-4989-b6f7-1de9e0339f53}" font_size="1" z="1" frame="false" text_from="UserText" text_width="-1">
+            <text>_</text>
+        </dynamic_text>
+        <terminal x="0" y="4" orientation="s"/>
+        <terminal x="-4" y="0" orientation="w"/>
     </description>
 </definition>

Modified: branches/0.60/elements/10_electric/10_allpole/114_connections/cross.elmt
===================================================================
--- branches/0.60/elements/10_electric/10_allpole/114_connections/cross.elmt	2018-04-08 03:38:53 UTC (rev 5313)
+++ branches/0.60/elements/10_electric/10_allpole/114_connections/cross.elmt	2018-04-08 04:05:18 UTC (rev 5314)
@@ -1,21 +1,25 @@
-<definition type="element" height="20" orientation="dyyy" version="0.5" link_type="simple" hotspot_y="9" width="20" hotspot_x="9">
-    <uuid uuid="{eb8040c8-6998-4f43-818b-1d368825ffac}"/>
+<definition height="20" link_type="terminal" hotspot_x="9" width="20" orientation="dyyy" hotspot_y="9" version="0.70" type="element">
+    <uuid uuid="{8c0d3e9c-dc37-41d7-bfd5-fe4dbf8dc4fb}"/>
     <names>
+        <name lang="ru">Пересечение</name>
+        <name lang="cs">Kříž</name>
+        <name lang="pl">Połączenie 2</name>
+        <name lang="it">Croce</name>
+        <name lang="es">Cruzar</name>
         <name lang="en">Cross</name>
-        <name lang="it">Croce</name>
-        <name lang="ru">Пересечение</name>
+        <name lang="ar">صليب</name>
         <name lang="fr">Croix</name>
-        <name lang="pl">Połączenie 2</name>
-        <name lang="cs">Kříž</name>
-		<name lang="es">Cruzar</name>
     </names>
+    <elementInformations/>
     <informations></informations>
     <description>
-        <circle x="-1" y="-1" style="line-style:normal;line-weight:normal;filling:black;color:black" antialias="true" diameter="2"/>
-        <input x="-0.5" y="-4.45" size="1" tagg="label" rotate="true" text="_"/>
-        <terminal orientation="e" x="4" y="0"/>
-        <terminal orientation="s" x="0" y="4"/>
-        <terminal orientation="n" x="0" y="-4"/>
-        <terminal orientation="w" x="-4" y="0"/>
+        <circle y="-1" style="line-style:normal;line-weight:normal;filling:black;color:black" x="-1" antialias="true" diameter="2"/>
+        <dynamic_text uuid="{fc5c039b-1fca-40d9-a6ff-a9e1775de38b}" text_width="-1" frame="false" y="-9.45" font_size="1" x="-0.5" z="2" rotation="0" text_from="UserText">
+            <text>_</text>
+        </dynamic_text>
+        <terminal y="0" orientation="e" x="4"/>
+        <terminal y="4" orientation="s" x="0"/>
+        <terminal y="-4" orientation="n" x="0"/>
+        <terminal y="0" orientation="w" x="-4"/>
     </description>
 </definition>

Modified: branches/0.60/elements/10_electric/10_allpole/114_connections/jump.elmt
===================================================================
--- branches/0.60/elements/10_electric/10_allpole/114_connections/jump.elmt	2018-04-08 03:38:53 UTC (rev 5313)
+++ branches/0.60/elements/10_electric/10_allpole/114_connections/jump.elmt	2018-04-08 04:05:18 UTC (rev 5314)
@@ -1,19 +1,23 @@
-<definition type="element" height="30" orientation="dyyy" version="0.5" link_type="simple" hotspot_y="14" width="10" hotspot_x="5">
-    <uuid uuid="{cd8b3f5f-5eae-416c-9966-c7b5529b6e63}"/>
+<definition width="10" hotspot_y="14" hotspot_x="5" height="30" link_type="terminal" orientation="dyyy" version="0.70" type="element">
+    <uuid uuid="{b5abb4c2-455d-45ff-95f2-328521f4e2e1}"/>
     <names>
         <name lang="en">Jump</name>
+        <name lang="fr">Saut</name>
+        <name lang="ar">قفز</name>
+        <name lang="cs">Skok</name>
         <name lang="it">Salto</name>
+        <name lang="pl">Brak połączenia</name>
         <name lang="ru">Перемычка</name>
-        <name lang="fr">Saut</name>
-        <name lang="pl">Brak połączenia</name>
-        <name lang="cs">Skok</name>
- 		<name lang="es">Puente</name>
+        <name lang="es">Puente</name>
     </names>
+    <elementInformations/>
     <informations></informations>
     <description>
-        <arc height="6" start="90" angle="-180" x="-3" y="-3" style="line-style:normal;line-weight:normal;filling:none;color:black" antialias="true" width="6"/>
-        <input x="1.5" y="-6.45" size="1" tagg="label" rotate="true" text="_"/>
-        <terminal orientation="n" x="0" y="-7"/>
-        <terminal orientation="s" x="0" y="7"/>
+        <arc x="-3" antialias="true" style="line-style:normal;line-weight:normal;filling:none;color:black" width="6" start="90" y="-3" height="6" angle="-180"/>
+        <dynamic_text font_size="1" x="1.5" text_from="UserText" z="2" y="-11.45" rotation="0" uuid="{1a3e4d91-15cc-424b-99d0-25930d779fb6}" frame="false" text_width="-1">
+            <text>_</text>
+        </dynamic_text>
+        <terminal x="0" y="-7" orientation="n"/>
+        <terminal x="0" y="7" orientation="s"/>
     </description>
 </definition>

Modified: branches/0.60/elements/10_electric/10_allpole/114_connections/qet_directory
===================================================================
--- branches/0.60/elements/10_electric/10_allpole/114_connections/qet_directory	2018-04-08 03:38:53 UTC (rev 5313)
+++ branches/0.60/elements/10_electric/10_allpole/114_connections/qet_directory	2018-04-08 04:05:18 UTC (rev 5314)
@@ -3,7 +3,6 @@
         <name lang="ru">Соединения</name>
         <name lang="de">Verbindungen</name>
         <name lang="en">Connections</name>
-        <name lang="es">Conexiones</name>
         <name lang="fr">Connections</name>
         <name lang="it">Collegamenti</name>
         <name lang="pl">Połączenia</name>

Modified: branches/0.60/elements/10_electric/10_allpole/114_connections/splice.elmt
===================================================================
--- branches/0.60/elements/10_electric/10_allpole/114_connections/splice.elmt	2018-04-08 03:38:53 UTC (rev 5313)
+++ branches/0.60/elements/10_electric/10_allpole/114_connections/splice.elmt	2018-04-08 04:05:18 UTC (rev 5314)
@@ -1,21 +1,25 @@
-<definition type="element" height="20" orientation="dyyy" version="0.5" link_type="simple" hotspot_y="4" width="30" hotspot_x="17">
-    <uuid uuid="{0f807068-d5a4-4628-85f4-0644e6d3129f}"/>
+<definition type="element" height="20" width="30" orientation="dyyy" version="0.70" hotspot_y="4" link_type="terminal" hotspot_x="17">
+    <uuid uuid="{709e6400-adc2-4faf-ba46-aa513d1dcaf1}"/>
     <names>
+        <name lang="fr">Epissure</name>
+        <name lang="pl">Połączenie 3</name>
+        <name lang="cs">Spojka</name>
         <name lang="en">Splice</name>
         <name lang="it">Spaziatura</name>
         <name lang="ru">Сращивание</name>
-        <name lang="fr">Epissure</name>
-        <name lang="pl">Połączenie 3</name>
-        <name lang="cs">Spojka</name>
-		<name lang="es">Empalme</name>
+        <name lang="es">Empalme</name>
     </names>
+    <elementInformations/>
     <informations></informations>
     <description>
-        <input x="1.5" y="3.55" size="1" tagg="label" rotate="true" text="_"/>
-        <line y2="0" style="line-style:normal;line-weight:normal;filling:none;color:black" length1="1.5" x1="0" y1="6" end2="none" x2="-6" antialias="false" end1="none" length2="1.5"/>
-        <line y2="0" style="line-style:normal;line-weight:normal;filling:none;color:black" length1="1.5" x1="1" y1="0" end2="none" x2="-5" antialias="false" end1="none" length2="1.5"/>
-        <terminal orientation="s" x="0" y="10"/>
-        <terminal orientation="w" x="-10" y="0"/>
-        <terminal orientation="e" x="4" y="0"/>
+        <dynamic_text text_width="-1" x="1.5" rotation="0" frame="false" uuid="{b653b162-d4c8-4660-a5ca-e6ca05a56de9}" font_size="1" z="1" text_from="ElementInfo" y="-1.45">
+            <text></text>
+            <info_name>label</info_name>
+        </dynamic_text>
+        <line x2="-6" antialias="false" x1="0" end2="none" y2="0" end1="none" length2="1.5" length1="1.5" y1="6" style="line-style:normal;line-weight:normal;filling:none;color:black"/>
+        <line x2="-5" antialias="false" x1="1" end2="none" y2="0" end1="none" length2="1.5" length1="1.5" y1="0" style="line-style:normal;line-weight:normal;filling:none;color:black"/>
+        <terminal x="0" orientation="s" y="10"/>
+        <terminal x="-10" orientation="w" y="0"/>
+        <terminal x="4" orientation="e" y="0"/>
     </description>
 </definition>

Modified: branches/0.60/elements/10_electric/10_allpole/114_connections/thruleft.elmt
===================================================================
--- branches/0.60/elements/10_electric/10_allpole/114_connections/thruleft.elmt	2018-04-08 03:38:53 UTC (rev 5313)
+++ branches/0.60/elements/10_electric/10_allpole/114_connections/thruleft.elmt	2018-04-08 04:05:18 UTC (rev 5314)
@@ -1,21 +1,25 @@
-<definition type="element" height="20" orientation="dyyy" version="0.5" link_type="simple" hotspot_y="4" width="30" hotspot_x="17">
-    <uuid uuid="{a1ced185-e98f-4cf1-8a62-3f8ea691bcb6}"/>
+<definition hotspot_y="4" height="20" hotspot_x="17" type="element" width="30" link_type="terminal" orientation="dyyy" version="0.70">
+    <uuid uuid="{9e88368e-1b20-4a56-8941-5d17a4cce2d4}"/>
     <names>
+        <name lang="cs">Levé spojení</name>
+        <name lang="ru">Справа налево</name>
+        <name lang="fr">Liaison gauche</name>
         <name lang="en">Thru left</name>
+        <name lang="ar">ربط يسار</name>
         <name lang="it">Collegamento sinistro</name>
-        <name lang="ru">Справа налево</name>
-        <name lang="fr">Liaison gauche</name>
         <name lang="pl">Połączenie 4</name>
-        <name lang="cs">Levé spojení</name>
-		<name lang="es">A la izquierda</name>
+        <name lang="es">A la izquierda</name>
     </names>
+    <elementInformations/>
     <informations></informations>
     <description>
-        <input x="1.5" y="3.55" size="1" tagg="label" rotate="true" text="_"/>
-        <line y2="0" style="line-style:normal;line-weight:normal;filling:none;color:black" length1="1.5" x1="0" y1="6" end2="none" x2="-6" antialias="false" end1="none" length2="1.5"/>
-        <line y2="5" style="line-style:normal;line-weight:normal;filling:none;color:black" length1="1.5" x1="0" y1="0" end2="none" x2="0" antialias="false" end1="none" length2="1.5"/>
-        <terminal orientation="e" x="4" y="0"/>
-        <terminal orientation="w" x="-10" y="0"/>
-        <terminal orientation="s" x="0" y="10"/>
+        <dynamic_text font_size="1" rotation="0" uuid="{5ff9bef8-b6a8-4cf8-ba82-4dabe7b1820f}" text_width="-1" frame="false" text_from="UserText" z="1" x="1.5" y="-1.45">
+            <text>_</text>
+        </dynamic_text>
+        <line x1="0" length1="1.5" end2="none" length2="1.5" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="6" y2="0" end1="none" antialias="false" x2="-6"/>
+        <line x1="0" length1="1.5" end2="none" length2="1.5" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="0" y2="5" end1="none" antialias="false" x2="0"/>
+        <terminal x="4" orientation="e" y="0"/>
+        <terminal x="-10" orientation="w" y="0"/>
+        <terminal x="0" orientation="s" y="10"/>
     </description>
 </definition>

Modified: branches/0.60/elements/10_electric/10_allpole/114_connections/thruright.elmt
===================================================================
--- branches/0.60/elements/10_electric/10_allpole/114_connections/thruright.elmt	2018-04-08 03:38:53 UTC (rev 5313)
+++ branches/0.60/elements/10_electric/10_allpole/114_connections/thruright.elmt	2018-04-08 04:05:18 UTC (rev 5314)
@@ -1,22 +1,26 @@
-<definition type="element" height="20" orientation="dyyy" version="0.5" link_type="simple" hotspot_y="4" width="30" hotspot_x="14">
-    <uuid uuid="{5d72394b-8aa0-4368-bc88-0f738478ca45}"/>
+<definition link_type="terminal" width="30" hotspot_x="14" orientation="dyyy" height="20" version="0.70" hotspot_y="4" type="element">
+    <uuid uuid="{6e40fff3-691c-4622-b9aa-4ff930a5b981}"/>
     <names>
         <name lang="en">Thru right</name>
-        <name lang="it">Collegamento destro</name>
         <name lang="ru">Слева направо</name>
+        <name lang="cs">Pravé spojení</name>
         <name lang="fr">Liaison droite</name>
+        <name lang="it">Collegamento destro</name>
+        <name lang="es">A la derecha</name>
+        <name lang="ar">ربط يمين</name>
         <name lang="pl">Połączenie 5</name>
-        <name lang="cs">Pravé spojení</name>
-		<name lang="es">A la derecha</name>
     </names>
+    <elementInformations/>
     <informations></informations>
     <description>
-        <input x="5.5" y="4.55" size="1" tagg="label" rotate="true" text="_"/>
-        <line y2="0" style="line-style:normal;line-weight:normal;filling:none;color:black" length1="1.5" x1="0" y1="0" end2="none" x2="-6" antialias="false" end1="none" length2="1.5"/>
-        <line y2="5" style="line-style:normal;line-weight:normal;filling:none;color:black" length1="1.5" x1="0" y1="0" end2="none" x2="0" antialias="false" end1="none" length2="1.5"/>
-        <line y2="6" style="line-style:normal;line-weight:normal;filling:none;color:black" length1="1.5" x1="6" y1="0" end2="none" x2="0" antialias="false" end1="none" length2="1.5"/>
-        <terminal orientation="s" x="0" y="10"/>
-        <terminal orientation="w" x="-10" y="0"/>
-        <terminal orientation="e" x="10" y="0"/>
+        <dynamic_text text_width="-1" y="-0.45" rotation="0" uuid="{ab829572-e7d6-4e5c-9c6e-a0852fea788e}" x="5.5" frame="false" text_from="UserText" font_size="1" z="1">
+            <text>_</text>
+        </dynamic_text>
+        <line antialias="false" x1="0" y1="0" style="line-style:normal;line-weight:normal;filling:none;color:black" length1="1.5" end2="none" end1="none" y2="0" length2="1.5" x2="-6"/>
+        <line antialias="false" x1="0" y1="0" style="line-style:normal;line-weight:normal;filling:none;color:black" length1="1.5" end2="none" end1="none" y2="5" length2="1.5" x2="0"/>
+        <line antialias="false" x1="6" y1="0" style="line-style:normal;line-weight:normal;filling:none;color:black" length1="1.5" end2="none" end1="none" y2="6" length2="1.5" x2="0"/>
+        <terminal orientation="s" y="10" x="0"/>
+        <terminal orientation="w" y="0" x="-10"/>
+        <terminal orientation="e" y="0" x="10"/>
     </description>
 </definition>

Modified: branches/0.60/sources/qetgraphicsitem/conductor.cpp
===================================================================
--- branches/0.60/sources/qetgraphicsitem/conductor.cpp	2018-04-08 03:38:53 UTC (rev 5313)
+++ branches/0.60/sources/qetgraphicsitem/conductor.cpp	2018-04-08 04:05:18 UTC (rev 5314)
@@ -1517,12 +1517,14 @@
  * part of the returned QSet.
  * @param all_diagram : if true search in all diagram of the project,
  * false search only in the parent diagram of this conductor
- * @param t_list, a list of terminal already cheched for the serach of potential.
+ * @param t_list, a list of terminal already found for this potential.
  * @return  a QSet of conductor at the same potential.
  */
-QSet<Conductor *> Conductor::relatedPotentialConductors(const bool all_diagram, QList <Terminal *> *t_list) {
+QSet<Conductor *> Conductor::relatedPotentialConductors(const bool all_diagram, QList <Terminal *> *t_list)
+{
 	bool declar_t_list = false;
-	if (t_list == 0) {
+	if (t_list == nullptr)
+	{
 		declar_t_list = true;
 		t_list = new QList <Terminal *>;
 	}
@@ -1531,23 +1533,29 @@
 	QList <Terminal *> this_terminal;
 	this_terminal << terminal1 << terminal2;
 
-	// Return all conductor of terminal 1 and 2
-	foreach (Terminal *terminal, this_terminal) {
-		if (!t_list -> contains(terminal)) {
-			t_list -> append(terminal);
-			QList <Conductor *> other_conductors_list_t = terminal -> conductors();
+		// Return all conductors of terminal 1 and 2
+	for (Terminal *terminal : this_terminal)
+	{
+		if (!t_list->contains(terminal))
+		{
+			t_list->append(terminal);
+			QList <Conductor *> other_conductors_list_t = terminal->conductors();
 
-			//get terminal share the same potential of @terminal, of parent element
-			Terminal *t1_bis = relatedPotentialTerminal(terminal, all_diagram);
-			if (t1_bis && !t_list->contains(t1_bis)) {
-				t_list -> append(t1_bis);
-				other_conductors_list_t += t1_bis->conductors();
+				//Get the other terminals of the parent element of @terminal, who share the same potential
+				//This is use for element type "folio report" and "terminal element"
+			for (Terminal *t : relatedPotentialTerminal(terminal, all_diagram))
+			{
+				if (!t_list->contains(t))
+				{
+					t_list -> append(t);
+					other_conductors_list_t += t->conductors();
+				}
 			}
 
 			other_conductors_list_t.removeAll(this);
-			// Research the conductors connected to conductors already found
-			foreach (Conductor *c, other_conductors_list_t) {
-				other_conductors += c -> relatedPotentialConductors(all_diagram, t_list);
+				//Get the conductors at the same potential for each conductors of other_conductors_list_t
+			for (Conductor *c : other_conductors_list_t) {
+				other_conductors += c->relatedPotentialConductors(all_diagram, t_list);
 			}
 			other_conductors += other_conductors_list_t.toSet();
 		}

Modified: branches/0.60/sources/qetgraphicsitem/terminal.cpp
===================================================================
--- branches/0.60/sources/qetgraphicsitem/terminal.cpp	2018-04-08 03:38:53 UTC (rev 5313)
+++ branches/0.60/sources/qetgraphicsitem/terminal.cpp	2018-04-08 04:05:18 UTC (rev 5314)
@@ -765,24 +765,27 @@
  * @param t terminal to start search
  * @param all_diagram :if true return all related terminal,
  * false return only terminal in the same diagram of @t
- * @return
+ * @return the list of terminal at the same potential
  */
-Terminal * relatedPotentialTerminal (const Terminal *terminal, const bool all_diagram) {
-	// If terminal parent element is a folio report.
-	if (all_diagram && terminal -> parentElement() -> linkType() & Element::AllReport) {
+QList<Terminal *> relatedPotentialTerminal (const Terminal *terminal, const bool all_diagram)
+{
+		// If terminal parent element is a folio report.
+	if (all_diagram && terminal -> parentElement() -> linkType() & Element::AllReport)
+	{
 		QList <Element *> elmt_list = terminal -> parentElement() -> linkedElements();
-		if (!elmt_list.isEmpty()) {
-			return (elmt_list.first() -> terminals().first());
+		if (!elmt_list.isEmpty())
+		{
+			return (elmt_list.first()->terminals());
 		}
 	}
-	// If terminal parent element is a Terminal element.
-	else if (terminal -> parentElement() -> linkType() & Element::Terminale) {
-		QList <Terminal *> terminals = terminal -> parentElement() -> terminals();
-		terminals.removeAll(const_cast<Terminal *> (terminal));
-		if (!terminals.isEmpty())
-			return terminals.first();
+		// If terminal parent element is a Terminal element.
+	else if (terminal -> parentElement() -> linkType() & Element::Terminale)
+	{
+		QList <Terminal *> terminals = terminal->parentElement()->terminals();
+		terminals.removeAll(const_cast<Terminal *>(terminal));
+		return terminals;
 	}
 
-	return nullptr;
+	return QList<Terminal *>();
 }
 

Modified: branches/0.60/sources/qetgraphicsitem/terminal.h
===================================================================
--- branches/0.60/sources/qetgraphicsitem/terminal.h	2018-04-08 03:38:53 UTC (rev 5313)
+++ branches/0.60/sources/qetgraphicsitem/terminal.h	2018-04-08 04:05:18 UTC (rev 5314)
@@ -169,6 +169,6 @@
 	return(name_terminal_);
 }
 
-Terminal * relatedPotentialTerminal (const Terminal *terminal, const bool all_diagram = true);
+QList<Terminal *> relatedPotentialTerminal (const Terminal *terminal, const bool all_diagram = true);
 
 #endif


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/