summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/ControlPanel.cpp27
1 files changed, 16 insertions, 11 deletions
diff --git a/src/gui/ControlPanel.cpp b/src/gui/ControlPanel.cpp
index 4aea2f08..96559dbf 100644
--- a/src/gui/ControlPanel.cpp
+++ b/src/gui/ControlPanel.cpp
@@ -115,21 +115,26 @@ ControlPanel::add_port(SharedPtr<PortModel> pm)
// Add port
if (pm->is_input()) {
- if (pm->type().is_control() && pm->is_toggle()) {
- ToggleControl* tc;
- Glib::RefPtr<Gnome::Glade::Xml> xml = GladeFactory::new_glade_reference("toggle_control");
- xml->get_widget_derived("toggle_control", tc);
- control = tc;
+ if (pm->type().is_control()) {
+ if (pm->is_toggle()) {
+ ToggleControl* tc;
+ Glib::RefPtr<Gnome::Glade::Xml> xml
+ = GladeFactory::new_glade_reference("toggle_control");
+ xml->get_widget_derived("toggle_control", tc);
+ control = tc;
+ } else {
+ SliderControl* sc;
+ Glib::RefPtr<Gnome::Glade::Xml> xml
+ = GladeFactory::new_glade_reference("control_strip");
+ xml->get_widget_derived("control_strip", sc);
+ control = sc;
+ }
} else if (pm->type().is_value() || pm->type().is_message()) {
StringControl* sc;
- Glib::RefPtr<Gnome::Glade::Xml> xml = GladeFactory::new_glade_reference("string_control");
+ Glib::RefPtr<Gnome::Glade::Xml> xml
+ = GladeFactory::new_glade_reference("string_control");
xml->get_widget_derived("string_control", sc);
control = sc;
- } else {
- SliderControl* sc;
- Glib::RefPtr<Gnome::Glade::Xml> xml = GladeFactory::new_glade_reference("control_strip");
- xml->get_widget_derived("control_strip", sc);
- control = sc;
}
}