summaryrefslogtreecommitdiffstats
path: root/src/gui/NodeModule.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-03-17 06:32:50 +0000
committerDavid Robillard <d@drobilla.net>2011-03-17 06:32:50 +0000
commit08a6a9058d114a3208f5304799e2c84576e52f90 (patch)
tree87d103383c852535c63105d89fa27d906779f313 /src/gui/NodeModule.cpp
parent69191cb00b87c5fda9e65d592a3b73ce80da9b0e (diff)
downloadingen-08a6a9058d114a3208f5304799e2c84576e52f90.tar.gz
ingen-08a6a9058d114a3208f5304799e2c84576e52f90.tar.bz2
ingen-08a6a9058d114a3208f5304799e2c84576e52f90.zip
Show plugin/port documentation in side pane when selected.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3103 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui/NodeModule.cpp')
-rw-r--r--src/gui/NodeModule.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/gui/NodeModule.cpp b/src/gui/NodeModule.cpp
index ea4c8079..d7523083 100644
--- a/src/gui/NodeModule.cpp
+++ b/src/gui/NodeModule.cpp
@@ -439,9 +439,22 @@ NodeModule::property_changed(const URI& key, const Atom& value)
void
NodeModule::set_selected(bool b)
{
- const LV2URIMap& uris = App::instance().uris();
+ const App& app = App::instance();
+ const LV2URIMap& uris = app.uris();
if (b != selected()) {
Module::set_selected(b);
+ if (b) {
+ PatchWindow* win = app.window_factory()->parent_patch_window(node());
+ if (win) {
+ const std::string& doc = node()->plugin_model()->documentation();
+ if (!doc.empty()) {
+ win->doc_textview()->get_buffer()->set_text(doc);
+ win->doc_textview()->show();
+ } else {
+ win->doc_textview()->hide();
+ }
+ }
+ }
if (App::instance().signal())
App::instance().engine()->set_property(_node->path(), uris.ingen_selected, b);
}