Topic: List of Folios always on 2nd page

Hello, I would like my list of folios in a project to be the first sheet, but is always placed on the second position.
If I move the list to first position, save and reopen the project, the list always returns to the second position.

Is this a bug of some kind I am experiencing?

Re: List of Folios always on 2nd page

Hello Arjan,

Folio list is hard coded to be always in second position.
look this :
https://qelectrotech.org/forum/viewtopi … 245#p10245

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: List of Folios always on 2nd page

Hello Scorpio,
Thank you for the quick response.

I've searched around before I posted my question and had crossed the same post you refer to, but I am not sure I quite grasp the concept.
I understand now it is hard coded in the software to move the 'list of folios' always to be the second sheet in the project, but I don't understand why.

I use QElectrotech on both a windows machine and a mac on different locations. This means I have to fiddle with the source code and rebuild on both machines and also repeat this each time the software is updated?
Why not make the list of folios behave like a normal page, or make it possible for the user to set desired behavior (always first, second, or last etc.) in the global or project settings?

Re: List of Folios always on 2nd page

Folio summary pages is generated on the fly if project contain in XML a  folioSheetQuantity="x" >= 1 page number variable.
We only store the number for follio summary page in the XML not the definition of pages and sheets values.
A this , I rest and enjoy the sea beach and sun.
I look this in à next weeks if I can add a menu in setting for user, but Joshua want to recode this summary pages in future.

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: List of Folios always on 2nd page

Thanks Scorpio,

Enjoy the beach! nomicons/smile For me vacation is over ant it's already work time again:'( 

Hope to see your patch in a future release.
Until then I'll just have to remember to move the list of folio's up before printing.

chears

Re: List of Folios always on 2nd page

  https://git.tuxfamily.org/qet/qet.git/c … 61baa20b23

Is a quickly patch, but work, maybe be improved in future.

0 for first position
1 for second position
99999 always in the end , btw if you add more folio after, summary pages is always at the end when you reload project.

Cheers.

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: List of Folios always on 2nd page

Arjan.Bok wrote:

I understand now it is hard coded in the software to move the 'list of folios' always to be the second sheet in the project, but I don't understand why.

In principle we put in first folio the cover page of project.

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: List of Folios always on 2nd page

scorpio810 wrote:

Is a quickly patch, but work, maybe be improved in future.

0 for first position
1 for second position
99999 always in the end , btw if you add more folio after, summary pages is always at the end when you reload project.

Cheers.

Yes, it was an old problem !
Not easy to understand numbering but work very well: 1=second position.

NB: is it possible to had button to reload project ?
Good job !

Re: List of Folios always on 2nd page

Not easy to understand numbering but work very well: 1=second position.

Like PLC (index 0 is the first digit).

Maybe, make a signal when user change spinbox value connected  to slots : rebuildDiagramsMap(); updateAllTabsTitle();
I could have done it, the methods already exist in the code, but I do not want the projects to be notified modify without a modification of the user.

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: List of Folios always on 2nd page

What do you prefer ?
1 = first postion 
2 = second position
3 = 3 position etc, 
0 = always in last position



--- sources/projectview.cpp
+++ sources/projectview.cpp
@@ -363,7 +363,7 @@ void ProjectView::addNewDiagram() {
void ProjectView::addNewDiagramFolioList() {
     if (m_project -> isReadOnly()) return;
     QSettings settings;
-    int i = (settings.value("projectview/foliolist_position").toInt()); //< Each new diagram is added  to the end of the project.
+    int i = (settings.value("projectview/foliolist_position").toInt() -1); //< Each new diagram is added  to the end of the project.
                //< We use @i to move the folio list at second position in the project
     foreach (Diagram *d, m_project -> addNewDiagramFolioList()) {
         DiagramView *new_diagram_view = new DiagramView(d);
@@ -885,7 +885,7 @@ void ProjectView::loadDiagrams()
     // If project have the folios list, move it at the beginning of the project
     if (m_project -> getFolioSheetsQuantity()) {
         for (int i = 0; i < m_project->getFolioSheetsQuantity(); i++)
-        m_tab -> tabBar() -> moveTab(diagram_views().size()-1, + (settings.value("projectview/foliolist_position").toInt()));
+        m_tab -> tabBar() -> moveTab(diagram_views().size()-1, + (settings.value("projectview/foliolist_position").toInt() -1));
         m_project->setModified(false);
     }
}
--- sources/ui/configpage/generalconfigurationpage.cpp
+++ sources/ui/configpage/generalconfigurationpage.cpp
@@ -55,7 +55,7 @@ GeneralConfigurationPage::GeneralConfigurationPage(QWidget *parent) :
     ui->m_export_terminal->setChecked(settings.value("nomenclature-exportlist", true).toBool());
     ui->m_border_0->setChecked(settings.value("border-columns_0", false).toBool());
     ui->m_autosave_sb->setValue(settings.value("diagrameditor/autosave-interval", 0).toInt());
-    ui->m_foliolist_sb->setValue(settings.value("projectview/foliolist_position", 1).toInt());
+    ui->m_foliolist_sb->setValue(settings.value("projectview/foliolist_position", 2).toInt());
 
     QString fontInfos = settings.value("diagramitemfont").toString() + " " +
                         settings.value("diagramitemsize").toString() + " (" +

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: List of Folios always on 2nd page

  https://git.tuxfamily.org/qet/qet.git/c … a0bb602d0b 

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: List of Folios always on 2nd page

scorpio810 wrote:

Is a quickly patch, but work, maybe be improved in future.

0 for first position
1 for second position
99999 always in the end , btw if you add more folio after, summary pages is always at the end when you reload project.

Cheers.

Ok, good !

Re: List of Folios always on 2nd page

@Galexis : changed on GIT

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: List of Folios always on 2nd page

NB: is it possible to had button to reload project ?

Why?, delete old folio list pages and generate a new summary page again.

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: List of Folios always on 2nd page

scorpio810 wrote:

NB: is it possible to had button to reload project ?

Why?, delete old folio list pages and generate a new summary page again.

Pour appliquer des changements qui nécessite la fermeture/réouverture du projet comme la position du sommaire par exemple, ou rafraîchir l'arborescence du projet quand on passe de iD à label et vice versa, ...