From cb6b66411cf6a34f7b24b199502958bb12960a0f Mon Sep 17 00:00:00 2001 From: Shamus Hammons Date: Sat, 15 Jan 2022 12:52:08 -0600 Subject: [PATCH] Fix incorrect object naming, keep hidden layers hidden when printing. --- src/applicationwindow.cpp | 5 ++++- src/structs.cpp | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/applicationwindow.cpp b/src/applicationwindow.cpp index b91177d..56b9735 100644 --- a/src/applicationwindow.cpp +++ b/src/applicationwindow.cpp @@ -318,7 +318,10 @@ void ApplicationWindow::HandlePrintRequest(QPrinter * printer) // Do object rendering... for(int i=0; iRenderObjects(&painter, drawing->document.objects, i); + { + if (Global::layerHidden[i] == false) + drawing->RenderObjects(&painter, drawing->document.objects, i); + } // Restore vars Global::origin = originSave; diff --git a/src/structs.cpp b/src/structs.cpp index 883e934..26a70f7 100644 --- a/src/structs.cpp +++ b/src/structs.cpp @@ -16,7 +16,7 @@ #include "mathconstants.h" const char objName[OTCount][16] = { - "None", "Line", "Circle", "Ellipse", "Arc", "Polygon", "Dimension", + "None", "Line", "Circle", "Ellipse", "Arc", "Dimension", "Spline", "Text", "Container" }; const char dimName[DTCount][32] = { -- 2.37.2