Skip to content

Commit

Permalink
Fill image with the background before exporting, fixes fritzing#3261
Browse files Browse the repository at this point in the history
  • Loading branch information
failiz authored and KjellMorgenstern committed Oct 20, 2020
1 parent 54715fb commit 72c8be1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/mainwindow/mainwindow_export.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,9 @@ void MainWindow::exportAux(QString fileName, QImage::Format format, int quality,
if (removeBackground) {
color = m_currentGraphicsView->background();
m_currentGraphicsView->setBackground(QColor::fromRgb(255,255,255,255));
image.fill(QColor::fromRgb(255,255,255,255));
}else{
image.fill(m_currentGraphicsView->background());
}

painter.begin(&image);
Expand Down

0 comments on commit 72c8be1

Please sign in to comment.