Skip to content

Commit

Permalink
Cleanup delete handling
Browse files Browse the repository at this point in the history
  • Loading branch information
thorpelawrence committed Nov 2, 2017
1 parent 0522acc commit 91b769d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ void MainWindow::updateProgress(int progress) {

void MainWindow::showImage(QImage image) {
this->image = image;
if (scene)
delete scene;
delete scene;
scene = new QGraphicsScene(ui->graphicsView);
scene->addPixmap(QPixmap::fromImage(image));
ui->graphicsView->setScene(scene);
Expand Down

0 comments on commit 91b769d

Please sign in to comment.