summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/NodeModule.cpp2
-rw-r--r--src/gui/PatchCanvas.cpp8
-rw-r--r--src/gui/PatchCanvas.hpp1
-rw-r--r--src/gui/PatchPortModule.cpp4
-rw-r--r--src/gui/PatchWindow.cpp10
5 files changed, 12 insertions, 13 deletions
diff --git a/src/gui/NodeModule.cpp b/src/gui/NodeModule.cpp
index c80137de..016a9b01 100644
--- a/src/gui/NodeModule.cpp
+++ b/src/gui/NodeModule.cpp
@@ -41,7 +41,7 @@ namespace GUI {
NodeModule::NodeModule(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<NodeModel> node)
- : FlowCanvas::Module(canvas, node->path().name())
+ : FlowCanvas::Module(canvas, node->path().name(), 0, 0, true, canvas->show_port_names())
, _node(node)
, _gui_widget(NULL)
, _gui_window(NULL)
diff --git a/src/gui/PatchCanvas.cpp b/src/gui/PatchCanvas.cpp
index 41794c74..1544b41b 100644
--- a/src/gui/PatchCanvas.cpp
+++ b/src/gui/PatchCanvas.cpp
@@ -291,10 +291,10 @@ void
PatchCanvas::show_port_names(bool b)
{
_show_port_names = b;
- for (ItemList::iterator m = _items.begin(); m != _items.end(); ++m) {
- boost::shared_ptr<NodeModule> mod = boost::dynamic_pointer_cast<NodeModule>(*m);
- if (mod)
- mod->show_port_labels(b);
+ for (ItemList::iterator i = _items.begin(); i != _items.end(); ++i) {
+ boost::shared_ptr<Module> m = boost::dynamic_pointer_cast<Module>(*i);
+ if (m)
+ m->set_show_port_labels(b);
}
}
diff --git a/src/gui/PatchCanvas.hpp b/src/gui/PatchCanvas.hpp
index 127b5bd3..67553284 100644
--- a/src/gui/PatchCanvas.hpp
+++ b/src/gui/PatchCanvas.hpp
@@ -63,6 +63,7 @@ public:
void arrange(bool use_length_hints);
void show_human_names(bool show);
void show_port_names(bool show);
+ bool show_port_names() const { return _show_port_names; }
void add_plugin(SharedPtr<PluginModel> pm);
void add_node(SharedPtr<NodeModel> nm);
diff --git a/src/gui/PatchPortModule.cpp b/src/gui/PatchPortModule.cpp
index 89e19fea..ff482fb7 100644
--- a/src/gui/PatchPortModule.cpp
+++ b/src/gui/PatchPortModule.cpp
@@ -34,8 +34,8 @@ namespace GUI {
PatchPortModule::PatchPortModule(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<PortModel> port)
-: FlowCanvas::Module(canvas, port->path().name(), 0, 0, false), // FIXME: coords?
- _port(port)
+ : FlowCanvas::Module(canvas, port->path().name(), 0, 0, false) // FIXME: coords?
+ , _port(port)
{
assert(canvas);
assert(port);
diff --git a/src/gui/PatchWindow.cpp b/src/gui/PatchWindow.cpp
index 7cd095f5..c2e9872d 100644
--- a/src/gui/PatchWindow.cpp
+++ b/src/gui/PatchWindow.cpp
@@ -602,14 +602,12 @@ PatchWindow::event_human_names_toggled()
void
PatchWindow::event_port_names_toggled()
{
- _view->canvas()->show_port_names(_menu_show_port_names->get_active());
if (_menu_show_port_names->get_active()) {
- App::instance().configuration()->set_name_style(Configuration::NONE);
+ _view->canvas()->set_direction(Canvas::HORIZONTAL);
+ _view->canvas()->show_port_names(true);
} else {
- if (_menu_human_names->get_active())
- App::instance().configuration()->set_name_style(Configuration::HUMAN);
- else
- App::instance().configuration()->set_name_style(Configuration::PATH);
+ _view->canvas()->set_direction(Canvas::VERTICAL);
+ _view->canvas()->show_port_names(false);
}
}