Browse Source

Fixed some dangling listeners in the BLOCKS demos

tags/2021-05-28
Tom Poole 7 years ago
parent
commit
42c8c2e26d
3 changed files with 14 additions and 0 deletions
  1. +3
    -0
      examples/BLOCKS/BlocksDrawingDemo.h
  2. +7
    -0
      examples/BLOCKS/BlocksMonitorDemo.h
  3. +4
    -0
      examples/BLOCKS/BlocksSynthDemo.h

+ 3
- 0
examples/BLOCKS/BlocksDrawingDemo.h View File

@@ -313,6 +313,8 @@ public:
#endif
setSize (600, 600);
topologyChanged();
}
~BlocksDrawingDemo()
@@ -321,6 +323,7 @@ public:
detachActiveBlock();
lightpadComponent.removeListener (this);
topologySource.removeListener (this);
}
void resized() override


+ 7
- 0
examples/BLOCKS/BlocksMonitorDemo.h View File

@@ -605,6 +605,13 @@ public:
#endif
setSize (600, 600);
topologyChanged();
}
~BlocksMonitorDemo()
{
topologySource.removeListener (this);
}
void paint (Graphics&) override {}


+ 4
- 0
examples/BLOCKS/BlocksSynthDemo.h View File

@@ -607,12 +607,16 @@ public:
#endif
setSize (600, 400);
topologyChanged();
}
~BlocksSynthDemo()
{
if (activeBlock != nullptr)
detachActiveBlock();
topologySource.removeListener (this);
}
void paint (Graphics& g) override


Loading…
Cancel
Save