summaryrefslogtreecommitdiffstats
path: root/src/progs/ingenuity
diff options
context:
space:
mode:
Diffstat (limited to 'src/progs/ingenuity')
-rw-r--r--src/progs/ingenuity/PatchController.cpp7
-rw-r--r--src/progs/ingenuity/PatchController.h4
-rw-r--r--src/progs/ingenuity/PatchTreeWindow.cpp4
-rw-r--r--src/progs/ingenuity/PatchView.cpp16
-rw-r--r--src/progs/ingenuity/PatchView.h3
5 files changed, 24 insertions, 10 deletions
diff --git a/src/progs/ingenuity/PatchController.cpp b/src/progs/ingenuity/PatchController.cpp
index 44275cd8..93603a12 100644
--- a/src/progs/ingenuity/PatchController.cpp
+++ b/src/progs/ingenuity/PatchController.cpp
@@ -248,7 +248,7 @@ PatchController::set_path(const Path& new_path)
parent->patch_model()->rename_node(old_path, new_path);
}
-
+#if 0
void
PatchController::enable()
{
@@ -271,7 +271,7 @@ PatchController::disable()
App::instance().patch_tree()->patch_disabled(m_model->path());
}
-
+#endif
void
PatchController::create_module(OmFlowCanvas* canvas)
@@ -367,7 +367,8 @@ PatchController::create_view()
}
// Set run checkbox
- m_patch_view->enabled(patch_model()->enabled());
+ if (patch_model()->enabled())
+ m_patch_view->enable();
}
diff --git a/src/progs/ingenuity/PatchController.h b/src/progs/ingenuity/PatchController.h
index 5fcee284..06236721 100644
--- a/src/progs/ingenuity/PatchController.h
+++ b/src/progs/ingenuity/PatchController.h
@@ -99,8 +99,8 @@ public:
void set_path(const Path& new_path);
- void enable();
- void disable();
+ //void enable();
+ //void disable();
CountedPtr<PatchModel> patch_model() const { return m_patch_model; }
diff --git a/src/progs/ingenuity/PatchTreeWindow.cpp b/src/progs/ingenuity/PatchTreeWindow.cpp
index 1ecab057..0d761ec4 100644
--- a/src/progs/ingenuity/PatchTreeWindow.cpp
+++ b/src/progs/ingenuity/PatchTreeWindow.cpp
@@ -181,12 +181,12 @@ PatchTreeWindow::event_patch_enabled_toggled(const Glib::ustring& path_str)
if ( ! pc->patch_model()->enabled()) {
if (m_enable_signal)
Controller::instance().enable_patch(patch_path);
- pc->enable();
+ //pc->enable();
row[m_patch_tree_columns.enabled_col] = true;
} else {
if (m_enable_signal)
Controller::instance().disable_patch(patch_path);
- pc->disable();
+ //pc->disable();
row[m_patch_tree_columns.enabled_col] = false;
}
}
diff --git a/src/progs/ingenuity/PatchView.cpp b/src/progs/ingenuity/PatchView.cpp
index be9aa1d6..bc1de20f 100644
--- a/src/progs/ingenuity/PatchView.cpp
+++ b/src/progs/ingenuity/PatchView.cpp
@@ -72,6 +72,9 @@ PatchView::patch_controller(PatchController* pc)
m_polyphony_label->set_text(txt);
//m_description_window->patch_model(pc->model());
+
+ pc->patch_model()->enabled_sig.connect(sigc::mem_fun(this, &PatchView::enable));
+ pc->patch_model()->disabled_sig.connect(sigc::mem_fun(this, &PatchView::disable));
}
@@ -108,10 +111,19 @@ PatchView::process_toggled()
void
-PatchView::enabled(bool e)
+PatchView::enable()
+{
+ m_enable_signal = false;
+ m_process_checkbutton->set_active(true);
+ m_enable_signal = true;
+}
+
+
+void
+PatchView::disable()
{
m_enable_signal = false;
- m_process_checkbutton->set_active(e);
+ m_process_checkbutton->set_active(false);
m_enable_signal = true;
}
diff --git a/src/progs/ingenuity/PatchView.h b/src/progs/ingenuity/PatchView.h
index 82aee9c7..975ef75e 100644
--- a/src/progs/ingenuity/PatchView.h
+++ b/src/progs/ingenuity/PatchView.h
@@ -66,7 +66,8 @@ public:
void zoom_changed();
void process_toggled();
- void enabled(bool e);
+ void enable();
+ void disable();
private:
PatchController* m_patch;