Skip to content

Commit

Permalink
scene: clear upon destruction
Browse files Browse the repository at this point in the history
Ref #42
  • Loading branch information
Tectu committed Aug 10, 2023
1 parent 7c12b6c commit 2045bf2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions qschematic/scene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ Scene::Scene(QObject* parent) :
renderCachedBackground();
}

Scene::~Scene()
{
clear();
}

gpds::container
Scene::to_container() const
{
Expand Down
2 changes: 1 addition & 1 deletion qschematic/scene.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ namespace QSchematic
Q_ENUM(Mode)

explicit Scene(QObject* parent = nullptr);
~Scene() override = default;
~Scene() override;

gpds::container to_container() const override;
void from_container(const gpds::container& container) override;
Expand Down

0 comments on commit 2045bf2

Please sign in to comment.