summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Patchage.cpp7
-rw-r--r--src/PatchageCanvas.cpp4
-rw-r--r--src/PatchageCanvas.hpp4
3 files changed, 6 insertions, 9 deletions
diff --git a/src/Patchage.cpp b/src/Patchage.cpp
index cd39cc8..3be7ed2 100644
--- a/src/Patchage.cpp
+++ b/src/Patchage.cpp
@@ -351,11 +351,8 @@ Patchage::zoom(double z)
void
Patchage::refresh()
{
- assert(_canvas);
-
- if (_enable_refresh) {
-
- _canvas->destroy();
+ if (_canvas && _enable_refresh) {
+ _canvas->clear();
#if defined(PATCHAGE_LIBJACK) || defined(HAVE_JACK_DBUS)
if (_jack_driver)
diff --git a/src/PatchageCanvas.cpp b/src/PatchageCanvas.cpp
index abb0b26..28fe1d4 100644
--- a/src/PatchageCanvas.cpp
+++ b/src/PatchageCanvas.cpp
@@ -332,9 +332,9 @@ PatchageCanvas::remove_module(PatchageModule* module)
}
void
-PatchageCanvas::destroy()
+PatchageCanvas::clear()
{
_port_index.clear();
_module_index.clear();
- Ganv::Canvas::destroy();
+ Ganv::Canvas::clear();
}
diff --git a/src/PatchageCanvas.hpp b/src/PatchageCanvas.hpp
index ac0c9f7..3701519 100644
--- a/src/PatchageCanvas.hpp
+++ b/src/PatchageCanvas.hpp
@@ -66,11 +66,11 @@ public:
bool make_connection(Ganv::Node* tail,
Ganv::Node* head,
- uint32_t color);
+ uint32_t color);
void remove_port(const PortID& id);
- void destroy();
+ void clear();
private:
Patchage* _app;