View Issue Details

IDProjectCategoryView StatusLast Update
0016607ScribusImport / Exportpublic2021-08-04 21:27
Reporterfsimonis Assigned Tojghali  
PrioritynormalSeverityminorReproducibilityN/A
Status resolvedResolutionfixed 
Product Version1.5.8.svn 
Fixed in Version1.5.8.svn 
Summary0016607: Show progress when importing pdf
DescriptionWhen importing a pdf, the dialogue currently shows a busy indicator until the import is complete.
This patch changes this to display the current progress of imported pages as a progress bar.
TagsPDF, UI
PatchYes

Activities

fsimonis

2021-08-04 11:08

reporter  

0001-Show-progress-when-importing-pdf.patch (1,289 bytes)   
From 118e5a38ba14628d408f7ca7a593023e6afa3a7a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Simonis?= <simonisfrederic@gmail.com>
Date: Wed, 4 Aug 2021 13:01:25 +0200
Subject: [PATCH] Show progress when importing pdf

---
 scribus/plugins/import/pdf/importpdf.cpp | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/scribus/plugins/import/pdf/importpdf.cpp b/scribus/plugins/import/pdf/importpdf.cpp
index 35ae73255..a8f962abb 100644
--- a/scribus/plugins/import/pdf/importpdf.cpp
+++ b/scribus/plugins/import/pdf/importpdf.cpp
@@ -465,6 +465,11 @@ bool PdfPlug::convert(const QString& fn)
 				}
 
 				parsePagesString(pageString, &pageNs, lastPage);
+				if (m_progressDialog)
+				{
+					m_progressDialog->setTotalSteps("GI", pageNs.size());
+					qApp->processEvents();
+				}
 				if (pageNs.size() <= 0)
 					return false;
 
@@ -657,6 +662,11 @@ bool PdfPlug::convert(const QString& fn)
 					//	m_Doc->pdfOptions().PresentVals.clear();
 						for (size_t i = 0; i < pageNs.size(); ++i)
 						{
+							if (m_progressDialog)
+							{
+								m_progressDialog->setProgress("GI", i);
+								qApp->processEvents();
+							}
 							int pp = pageNs[i];
 							m_Doc->setActiveLayer(baseLayer);
 							if (firstPg)
-- 
2.32.0

jghali

2021-08-04 21:27

administrator   ~0049198

Applied, thanks!

Issue History

Date Modified Username Field Change
2021-08-04 11:08 fsimonis New Issue
2021-08-04 11:08 fsimonis Tag Attached: PDF
2021-08-04 11:08 fsimonis Tag Attached: UI
2021-08-04 11:08 fsimonis File Added: 0001-Show-progress-when-importing-pdf.patch
2021-08-04 21:27 jghali Assigned To => jghali
2021-08-04 21:27 jghali Status new => resolved
2021-08-04 21:27 jghali Resolution open => fixed
2021-08-04 21:27 jghali Fixed in Version => 1.5.8.svn
2021-08-04 21:27 jghali Note Added: 0049198