From 11d6ad2a4574e55e6d9aed43d452dcef822a9247 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Fri, 5 Jan 2018 17:34:25 +0100 Subject: Remove old scene in more appropriate place Previous implementation was pretty confusing. There was no delete on level where variable override was happening. The object removal was implemented inside constructor. Very nasty. --- qtmips_gui/coreview.cpp | 5 ----- 1 file changed, 5 deletions(-) (limited to 'qtmips_gui/coreview.cpp') diff --git a/qtmips_gui/coreview.cpp b/qtmips_gui/coreview.cpp index 1750cc1..7210f1c 100644 --- a/qtmips_gui/coreview.cpp +++ b/qtmips_gui/coreview.cpp @@ -36,9 +36,4 @@ CoreViewScene::CoreViewScene(CoreView *view, machine::QtMipsMachine *machine) : alu->setPos(200, 100); pc_multiplexer->setPos(60, 100); pc_multiplexer->set(2); - - QGraphicsScene *old_scene = view->scene(); - view->setScene(this); - if (old_scene != nullptr) - delete old_scene; } -- cgit v1.2.3