Fixed patch ports and some bugs.
git-svn-id: http://svn.drobilla.net/lad@172 a436a847-0d15-0410-975c-d299462d15a1
This commit is contained in:
parent
e6317eb3fb
commit
913678f835
|
@ -186,7 +186,6 @@ Module::module_event(GdkEvent* event)
|
|||
if ( !(event->button.state & GDK_CONTROL_MASK))
|
||||
canvas->clear_selection();
|
||||
canvas->select_module(m_name);
|
||||
assert(m_selected);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -434,7 +433,10 @@ Module::set_name(const string& n)
|
|||
|
||||
/** Add a port to this module.
|
||||
*
|
||||
* A reference to p is held until remove_port is called to remove it.
|
||||
* A reference to p is held until remove_port is called to remove it. Note
|
||||
* that the module will not be resized (for performance reasons when adding
|
||||
* many ports in succession), so you must explicitly call resize() after this
|
||||
* for the module to look at all sensible.
|
||||
*/
|
||||
void
|
||||
Module::add_port(boost::shared_ptr<Port> p)
|
||||
|
|
|
@ -50,9 +50,6 @@ NodeControlWindow::NodeControlWindow(SharedPtr<NodeModel> node, size_t poly)
|
|||
show_all_children();
|
||||
resize();
|
||||
|
||||
// FIXME: not working
|
||||
//set_icon_from_file(string(PKGDATADIR) + "/om-icon.png");
|
||||
|
||||
m_callback_enabled = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -41,11 +41,9 @@ PatchPortModule::PatchPortModule(boost::shared_ptr<PatchCanvas> canvas, SharedPt
|
|||
assert(canvas);
|
||||
assert(port);
|
||||
|
||||
//if (PtrCast<PatchModel>(port->parent())) {
|
||||
// m_patch_port = boost::shared_ptr<Port>(new Port(shared_from_this(), port, true));
|
||||
//}
|
||||
|
||||
resize();
|
||||
assert(PtrCast<PatchModel>(port->parent()));
|
||||
|
||||
/*resize();
|
||||
|
||||
const Atom& x_atom = port->get_metadata("ingenuity:canvas-x");
|
||||
const Atom& y_atom = port->get_metadata("ingenuity:canvas-y");
|
||||
|
@ -57,7 +55,7 @@ PatchPortModule::PatchPortModule(boost::shared_ptr<PatchCanvas> canvas, SharedPt
|
|||
double default_y;
|
||||
canvas->get_new_module_location(default_x, default_y);
|
||||
move_to(default_x, default_y);
|
||||
}
|
||||
}*/
|
||||
|
||||
port->metadata_update_sig.connect(sigc::mem_fun(this, &PatchPortModule::metadata_update));
|
||||
}
|
||||
|
@ -68,10 +66,14 @@ PatchPortModule::create(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<PortMod
|
|||
{
|
||||
boost::shared_ptr<PatchPortModule> ret = boost::shared_ptr<PatchPortModule>(
|
||||
new PatchPortModule(canvas, port));
|
||||
assert(ret);
|
||||
|
||||
for (MetadataMap::const_iterator m = port->metadata().begin(); m != port->metadata().end(); ++m)
|
||||
ret->metadata_update(m->first, m->second);
|
||||
|
||||
ret->m_patch_port = boost::shared_ptr<Port>(new Port(ret->shared_from_this(), port, true));
|
||||
ret->add_port(ret->m_patch_port);
|
||||
|
||||
ret->resize();
|
||||
|
||||
return ret;
|
||||
|
|
|
@ -44,7 +44,7 @@ class Port;
|
|||
*
|
||||
* \ingroup Ingenuity
|
||||
*/
|
||||
class PatchPortModule : public LibFlowCanvas::Module//, public boost::enable_shared_from_this<LibFlowCanvas::Module>
|
||||
class PatchPortModule : public boost::enable_shared_from_this<LibFlowCanvas::Module>, public LibFlowCanvas::Module
|
||||
{
|
||||
public:
|
||||
static boost::shared_ptr<PatchPortModule> create (boost::shared_ptr<PatchCanvas> canvas,
|
||||
|
@ -66,7 +66,7 @@ protected:
|
|||
|
||||
void metadata_update(const string& key, const Atom& value);
|
||||
|
||||
SharedPtr<PortModel> m_port;
|
||||
SharedPtr<PortModel> m_port;
|
||||
boost::shared_ptr<Port> m_patch_port; ///< Port on this 'anonymous' module
|
||||
};
|
||||
|
||||
|
|
|
@ -3207,7 +3207,7 @@ Contributors:
|
|||
<property name="artists">Usability / UI Design:
|
||||
Thorsten Wilms</property>
|
||||
<property name="translator_credits" translatable="yes" comments="TRANSLATORS: Replace this string with your names, one name per line.">translator-credits</property>
|
||||
<property name="logo">om-icon.png</property>
|
||||
<property name="logo">ingen-icon.png</property>
|
||||
</widget>
|
||||
|
||||
<widget class="GtkWindow" id="patch_tree_win">
|
||||
|
|
Loading…
Reference in New Issue