Skip to content

Commit

Permalink
Minor tweaks around finalizing the document
Browse files Browse the repository at this point in the history
  • Loading branch information
dragotin committed Dec 9, 2024
1 parent 0542ccb commit 6a4a89a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/finalizedoc.ui
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>After the document was finalized it can not be changed any more. This fulfills legal requirements.</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;After the document was finalized it can not be changed any more. The finalized document can be sent to the customer. &lt;br/&gt;This fulfills legal requirements.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::TextFormat::RichText</enum>
Expand Down
5 changes: 2 additions & 3 deletions src/portal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,7 @@ void Portal::slotFinalizeDoc()
dia->setAttribute(Qt::WA_DeleteOnClose);
Ui::FinalizeDocDialog ui;
ui.setupUi(dia);
dia->setWindowTitle(i18n("Finalize Document"));
QIcon icon = DefaultProvider::self()->icon("checklist");
QPixmap icp = icon.pixmap(QSize(120, 120));
ui.iconLabel->setPixmap(icp);
Expand All @@ -797,7 +798,7 @@ void Portal::slotFinalizeDoc()
AllDocsView *dv = m_portalView->allDocsView();
dv->slotUpdateView(doc);
const QString uuid = doc->uuid();
slotGeneratePDF(uuid);
slotDocumentSelected(uuid); // re-generates PDF and such
delete doc;
});
doc->finalize();
Expand Down Expand Up @@ -1016,9 +1017,7 @@ void Portal::slotDocumentSelected( const QString& uuid)

if (indx.pdfOutdated(uuid)) {
// the PDF should exist. if not, try to create if that is feasible
if (!docPtr->state().forcesReadOnly()) {
slotGeneratePDF(uuid);
}
} else {
pdfEnabled = true;
}
Expand Down

0 comments on commit 6a4a89a

Please sign in to comment.