Skip to content

Commit

Permalink
- Remove the background when exporting plot using qwt 5.
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@20681 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adeas31 committed May 19, 2014
1 parent e20b631 commit 065d7db
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion OMPlot/OMPlotGUI/PlotWindow.cpp
Expand Up @@ -905,7 +905,9 @@ void PlotWindow::exportDocument()
{
#if QWT_VERSION < 0x060000
QPixmap pixmap(mpPlot->size());
mpPlot->render(&pixmap);
/* removes the gray widget background when OMPlot is used as library. */
pixmap.fill(Qt::white);
mpPlot->render(&pixmap, QPoint(), QRegion(), DrawChildren);
if (!pixmap.save(fileName)) {
QMessageBox::critical(this, "Error", "Failed to save image " + fileName);
}
Expand Down

0 comments on commit 065d7db

Please sign in to comment.