[TD]refactor print routines out of MDIViewPage

This commit is contained in:
wandererfan
2023-08-29 14:06:10 -04:00
committed by WandererFan
parent 409f3fc4e3
commit 4046e03cc6
6 changed files with 582 additions and 330 deletions

View File

@@ -42,6 +42,7 @@
#include "QGSPage.h"
#include "ViewProviderPage.h"
#include "ViewProviderDrawingView.h"
#include "PagePrinter.h"
namespace TechDrawGui {
@@ -185,12 +186,12 @@ private:
if (vpp) {
mdi = vpp->getMDIViewPage();
if (mdi) {
mdi->printPdf(filePath);
mdi->savePDF(filePath);
} else {
vpp->showMDIViewPage();
mdi = vpp->getMDIViewPage();
if (mdi) {
mdi->printPdf(filePath);
mdi->savePDF(filePath);
} else {
throw Py::TypeError("Page not available! Is it Hidden?");
}