From 9bd9f180c22cc586dfd83e57e0a13a7b559b3274 Mon Sep 17 00:00:00 2001 From: "G.K.MacGregor" Date: Thu, 2 Feb 2023 18:18:51 +0000 Subject: [PATCH] Don't hide control codes or grid when exporting PNG --- mainwidget.cpp | 5 ----- mainwindow.cpp | 5 ----- 2 files changed, 10 deletions(-) diff --git a/mainwidget.cpp b/mainwidget.cpp index 7fedd87..f12cbf1 100644 --- a/mainwidget.cpp +++ b/mainwidget.cpp @@ -694,18 +694,13 @@ void LevelOneScene::toggleGrid(bool gridOn) void LevelOneScene::hideGUIElements(bool hidden) { if (hidden) { - m_mainGridItemGroup->setVisible(false); m_cursorRectItem->setVisible(false); m_selectionRectItem->setVisible(false); - for (int i=0; i<32; i++) - if (m_sidePanelGridNeeded[i]) - m_sidePanelGridItemGroup[i]->setVisible(false); } else { if (static_cast(m_levelOneProxyWidget->widget())->document()->selectionActive()) m_selectionRectItem->setVisible(true); m_cursorRectItem->setVisible(true); - toggleGrid(m_grid); } } diff --git a/mainwindow.cpp b/mainwindow.cpp index dca9593..00240f8 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -186,9 +186,6 @@ void MainWindow::exportPNG() // Prepare widget image for extraction m_textWidget->pauseFlash(true); m_textScene->hideGUIElements(true); - bool reshowControlCodes = m_textWidget->showControlCodes(); - if (reshowControlCodes) - m_textWidget->setShowControlCodes(false); // Disable exporting in Mix mode as it corrupts the background bool reMix = m_textWidget->pageRender()->mix(); if (reMix) { @@ -206,8 +203,6 @@ void MainWindow::exportPNG() // Now we've extracted the image we can put the GUI things back m_textScene->hideGUIElements(false); - if (reshowControlCodes) - m_textWidget->setShowControlCodes(true); if (reMix) { m_textWidget->setMix(true); m_textScene->setMix(true);