From bf974f19562816c48acff224b931ad6b8cc70d18 Mon Sep 17 00:00:00 2001 From: scorpio810 Date: Sun, 5 Aug 2018 15:04:15 +0000 Subject: [PATCH] Fix bug 164 : title block editor : show 'projectpath' as available value git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5463 bfdf4180-ca20-0410-9c96-a3a8aa849046 --- sources/qetproject.cpp | 2 ++ sources/titleblock/templatecellwidget.cpp | 1 + 2 files changed, 3 insertions(+) diff --git a/sources/qetproject.cpp b/sources/qetproject.cpp index 733a81ce7..c29338fff 100644 --- a/sources/qetproject.cpp +++ b/sources/qetproject.cpp @@ -257,6 +257,7 @@ void QETProject::setFilePath(const QString &filepath) { emit(projectFilePathChanged(this, m_file_path)); emit(projectInformationsChanged(this)); + updateDiagramsFolioData(); } /** @@ -1729,6 +1730,7 @@ void QETProject::updateDiagramsFolioData() { DiagramContext project_wide_properties = project_properties_; project_wide_properties.addValue("projecttitle", title()); + project_wide_properties.addValue("projectpath", filePath()); for (int i = 0 ; i < total_folio ; ++ i) { QString title = m_diagrams_list[i] -> title(); diff --git a/sources/titleblock/templatecellwidget.cpp b/sources/titleblock/templatecellwidget.cpp index dd01278c4..fac5ecf8c 100644 --- a/sources/titleblock/templatecellwidget.cpp +++ b/sources/titleblock/templatecellwidget.cpp @@ -445,6 +445,7 @@ QString TitleBlockTemplateCellWidget::defaultVariablesString() const { "
  • %{folio-id} : position du folio dans le projet
  • " "
  • %{folio-total} : nombre total de folios dans le projet
  • " "
  • %{projecttitle} : titre du projet
  • " + "
  • %{projectpath} : chemin du projet
  • " "" ); return(def_var_string);