Don't hide control codes or grid when exporting PNG

This commit is contained in:
G.K.MacGregor
2023-02-02 18:18:51 +00:00
parent c64be6a4c9
commit 9bd9f180c2
2 changed files with 0 additions and 10 deletions

View File

@@ -694,18 +694,13 @@ void LevelOneScene::toggleGrid(bool gridOn)
void LevelOneScene::hideGUIElements(bool hidden) void LevelOneScene::hideGUIElements(bool hidden)
{ {
if (hidden) { if (hidden) {
m_mainGridItemGroup->setVisible(false);
m_cursorRectItem->setVisible(false); m_cursorRectItem->setVisible(false);
m_selectionRectItem->setVisible(false); m_selectionRectItem->setVisible(false);
for (int i=0; i<32; i++)
if (m_sidePanelGridNeeded[i])
m_sidePanelGridItemGroup[i]->setVisible(false);
} else { } else {
if (static_cast<TeletextWidget *>(m_levelOneProxyWidget->widget())->document()->selectionActive()) if (static_cast<TeletextWidget *>(m_levelOneProxyWidget->widget())->document()->selectionActive())
m_selectionRectItem->setVisible(true); m_selectionRectItem->setVisible(true);
m_cursorRectItem->setVisible(true); m_cursorRectItem->setVisible(true);
toggleGrid(m_grid);
} }
} }

View File

@@ -186,9 +186,6 @@ void MainWindow::exportPNG()
// Prepare widget image for extraction // Prepare widget image for extraction
m_textWidget->pauseFlash(true); m_textWidget->pauseFlash(true);
m_textScene->hideGUIElements(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 // Disable exporting in Mix mode as it corrupts the background
bool reMix = m_textWidget->pageRender()->mix(); bool reMix = m_textWidget->pageRender()->mix();
if (reMix) { if (reMix) {
@@ -206,8 +203,6 @@ void MainWindow::exportPNG()
// Now we've extracted the image we can put the GUI things back // Now we've extracted the image we can put the GUI things back
m_textScene->hideGUIElements(false); m_textScene->hideGUIElements(false);
if (reshowControlCodes)
m_textWidget->setShowControlCodes(true);
if (reMix) { if (reMix) {
m_textWidget->setMix(true); m_textWidget->setMix(true);
m_textScene->setMix(true); m_textScene->setMix(true);