1 (edited by mentor 2020-06-30 13:41:27)

Topic: reference folio ver8

hello
I have problem with reference folio arrow.
In ver 7 I customise reference arrow by adding %{tension-protocol}  / %{label} to get more information
in ver 8 I don't get crossing information in my elements.

When I copy crossing arrow to user collection and don't change anything crossing reference works fine but if I change anything for example move dynamic text file "/" crossing stop work. Even if I undo changes crossing don't work.

I use this crossing functionality to make PLC symbols and in ver 8 crossing reference in my PLC symbols don't work too.

2

Re: reference folio ver8

Hi Mentor,

you could share an example project and more explanations?

3

Re: reference folio ver8

[img][/img]

Post's attachments

qelectrotech_ver7.png, 23.17 kb, 1047 x 606
qelectrotech_ver7.png 23.17 kb, 4 downloads since 2020-06-30 

4

Re: reference folio ver8

[img][/img]

Post's attachments

qelectrotech ver8.png, 20.12 kb, 879 x 537
qelectrotech ver8.png 20.12 kb, 4 downloads since 2020-06-30 

5

Re: reference folio ver8

example in attachment

Post's attachments

Attachment icon qelectrotech ver7.qet 30.24 kb, 15 downloads since 2020-06-30 

6

Re: reference folio ver8

Thanks for report this issue, maybe since we change minus by underscore?
https://git.tuxfamily.org/qet/qet.git/c … 5fa9a304f7

If I try with %{function} seems working.
%{tension_protocol} or %{tension-protocol} is missing in this widget and wrote %{void} ?!...
There also seems to be a bug with composite text and %{label}.

https://download.tuxfamily.org/qet/forum_img_2/0.8-bug_check_report_folio.png

7

Re: reference folio ver8

Maybe a first patch.

Post's attachments

Attachment icon 0001-Improve-last-patch.patch 1.27 kb, 8 downloads since 2020-07-01 

Attachment icon 0001-Try-to-fix-conductorInfoKeys.patch 5.07 kb, 9 downloads since 2020-07-01 

8

Re: reference folio ver8

I use AppImage version in debian.
I don't know how implement this code.

9

Re: reference folio ver8

You can't on AppImage, these patch is to apply on GIT local sources and need to compile code after to try the changes..
These patches are just one todo task for me, Joshua, maybe Simon to keep improving.

10 (edited by De-Backer 2020-07-02 18:55:30)

Re: reference folio ver8

fout bij "dynamicelementtextitem.cpp"
@ 1183

label = elmt->actualLabel();

from:

QString DynamicElementTextItem::reportReplacedCompositeText() const
{
    QString string;
 
    if(m_parent_element.data()->linkType() & Element::AllReport)
    {
        string = m_composite_text;
 
        if (string.contains("%{label}") && m_other_report)
        {
            Element *elmt = m_other_report.data();
            QString label = m_report_formula;
            label = elmt->actualLabel(); // <======= set to NULL!!!!!
            string.replace("%{label}", label);
            qDebug()<<string<<label<<elmt->actualLabel(); // test van De-Backer
        }
        if (m_watched_conductor)
        {
            if(string.contains("%{function}"))
                string.replace("%{function}", m_watched_conductor.data()->properties().m_function);
            if(string.contains("%{tension-protocol}"))
                string.replace("%{tension-protocol}", m_watched_conductor.data()->properties().m_tension_protocol);
            if(string.contains("%{couleur-conducteur"))
                string.replace("%{couleur-conducteur}", m_watched_conductor.data()->properties().m_wire_color);
            if(string.contains("%{section-conducteur"))
                string.replace("%{section-conducteur}", m_watched_conductor.data()->properties().m_wire_section);
        }
    }
 
    return string;
}

Seeking further.... 


the origin of the bug is id fc73d53d73bc341e853e7f36e797bd8b9ad47b46

test: it works for that, but not after that

Joshua can certainly find the bug faster. Than me.

11

Re: reference folio ver8

CSV export : correctly export label https://git.tuxfamily.org/qet/qet.git/c … 8b9ad47b46   ?

12 (edited by De-Backer 2020-07-02 20:51:22)

Re: reference folio ver8

yes that's the commit

I hope the Joshua or anyone else can fix this is a bit too complex for me.

13

Re: reference folio ver8

I will see that tomorrow

14

Re: reference folio ver8

Fixed.
De-Backer, you was in the good way, it was the good line and the good comit wich broke the formula. nomicons/wink

15

Re: reference folio ver8

That solution would take me weeks.
The autonum class is one that I do not yet master.
In any case, good job Joshua.

16

Re: reference folio ver8

@ Mentor: fixed, but you need to add again Voltage /protocol informations for each conductor, and edit your report folioa nd change
{tension-protocol} -> {tension_protocol}

https://git.tuxfamily.org/qet/qet.git/c … 2d235417cf

Post's attachments

Attachment icon Screenshot1.png 165.77 kb, 1 downloads since 2020-07-05 

17

Re: reference folio ver8

https://git.tuxfamily.org/qet/qet.git/c … 67831fa112

18

Re: reference folio ver8

thank you for very fast reaction
regards
jarek

19

Re: reference folio ver8

De-Backer wrote:

fout bij "dynamicelementtextitem.cpp"
@ 1183

label = elmt->actualLabel();

from:

QString DynamicElementTextItem::reportReplacedCompositeText() const
{
    QString string;
 
    if(m_parent_element.data()->linkType() & Element::AllReport)
    {
        string = m_composite_text;
 
        if (string.contains("%{label}") && m_other_report)
        {
            Element *elmt = m_other_report.data();
            QString label = m_report_formula;
            label = elmt->actualLabel(); // <======= set to NULL!!!!!
            string.replace("%{label}", label);
            qDebug()<<string<<label<<elmt->actualLabel(); // test van De-Backer
        }
        if (m_watched_conductor)
        {
            if(string.contains("%{function}"))
                string.replace("%{function}", m_watched_conductor.data()->properties().m_function);
            if(string.contains("%{tension-protocol}"))
                string.replace("%{tension-protocol}", m_watched_conductor.data()->properties().m_tension_protocol);
            if(string.contains("%{couleur-conducteur"))
                string.replace("%{couleur-conducteur}", m_watched_conductor.data()->properties().m_wire_color);
            if(string.contains("%{section-conducteur"))
                string.replace("%{section-conducteur}", m_watched_conductor.data()->properties().m_wire_section);
        }
    }
 
    return string;
}

Seeking further.... 


the origin of the bug is id fc73d53d73bc341e853e7f36e797bd8b9ad47b46

test: it works for that, but not after that

Joshua can certainly find the bug faster. Than me.


In the above code is another bug regarding the color and the section of the conductor:


...
            if(string.contains("%{couleur-conducteur"))
                string.replace("%{couleur-conducteur}", m_watched_conductor.data()->properties().m_wire_color);
            if(string.contains("%{section-conducteur"))
                string.replace("%{section-conducteur}", m_watched_conductor.data()->properties().m_wire_section);
...

The if statement is missing a curly brace.

20

Re: reference folio ver8

I must not be awake enough I do not see where?
https://git.tuxfamily.org/qet/qet.git/t … .cpp#n1139

Edit : already fixed typo.

21 (edited by De-Backer 2020-07-06 13:33:35)

Re: reference folio ver8

fix => Joshua
https://git.tuxfamily.org/qet/qet.git/c … 2d235417cf

@@ -1186,12 +1186,12 @@ QString DynamicElementTextItem::reportReplacedCompositeText() const
         {
             if(string.contains("%{function}"))
                 string.replace("%{function}", m_watched_conductor.data()->properties().m_function);
-            if(string.contains("%{tension-protocol}"))
-                string.replace("%{tension-protocol}", m_watched_conductor.data()->properties().m_tension_protocol);
-            if(string.contains("%{}couleur-conducteur"))
-                string.replace("%{couleur-conducteur}", m_watched_conductor.data()->properties().m_wire_color);
-            if(string.contains("%{}section-conducteur"))
-                string.replace("%{section-conducteur}", m_watched_conductor.data()->properties().m_wire_section);
+            if(string.contains("%{tension_protocol}"))
+                string.replace("%{tension_protocol}", m_watched_conductor.data()->properties().m_tension_protocol);
+            if(string.contains("%{conductor_color}"))
+                string.replace("%{conductor_color}", m_watched_conductor.data()->properties().m_wire_color);
+            if(string.contains("%{conductor_section}"))
+                string.replace("%{conductor_section}", m_watched_conductor.data()->properties().m_wire_section);
         }
     }