mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
Better fix for non-rearrangement after open for the port matrix.
git-svn-id: svn://localhost/ardour2/branches/3.0@5377 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
fea3992f29
commit
2e7eeef448
4 changed files with 26 additions and 12 deletions
|
|
@ -64,7 +64,7 @@ PortGroup::add_bundle (boost::shared_ptr<Bundle> b)
|
||||||
|
|
||||||
_bundles.push_back (r);
|
_bundles.push_back (r);
|
||||||
|
|
||||||
Modified ();
|
Changed ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Add a bundle to a group.
|
/** Add a bundle to a group.
|
||||||
|
|
@ -84,7 +84,7 @@ PortGroup::add_bundle (boost::shared_ptr<Bundle> b, Gdk::Color c)
|
||||||
|
|
||||||
_bundles.push_back (r);
|
_bundles.push_back (r);
|
||||||
|
|
||||||
Modified ();
|
Changed ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -104,7 +104,7 @@ PortGroup::remove_bundle (boost::shared_ptr<Bundle> b)
|
||||||
i->changed_connection.disconnect ();
|
i->changed_connection.disconnect ();
|
||||||
_bundles.erase (i);
|
_bundles.erase (i);
|
||||||
|
|
||||||
Modified ();
|
Changed ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -122,7 +122,7 @@ PortGroup::clear ()
|
||||||
}
|
}
|
||||||
|
|
||||||
_bundles.clear ();
|
_bundles.clear ();
|
||||||
Modified ();
|
Changed ();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
@ -439,7 +439,7 @@ PortGroupList::add_group (boost::shared_ptr<PortGroup> g)
|
||||||
{
|
{
|
||||||
_groups.push_back (g);
|
_groups.push_back (g);
|
||||||
|
|
||||||
g->Modified.connect (sigc::mem_fun (*this, &PortGroupList::emit_changed));
|
g->Changed.connect (sigc::mem_fun (*this, &PortGroupList::emit_changed));
|
||||||
|
|
||||||
_bundle_changed_connections.push_back (
|
_bundle_changed_connections.push_back (
|
||||||
g->BundleChanged.connect (sigc::hide (sigc::mem_fun (*this, &PortGroupList::emit_changed)))
|
g->BundleChanged.connect (sigc::hide (sigc::mem_fun (*this, &PortGroupList::emit_changed)))
|
||||||
|
|
|
||||||
|
|
@ -64,12 +64,12 @@ public:
|
||||||
|
|
||||||
void set_visible (bool v) {
|
void set_visible (bool v) {
|
||||||
_visible = v;
|
_visible = v;
|
||||||
Modified ();
|
Changed ();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool has_port (std::string const &) const;
|
bool has_port (std::string const &) const;
|
||||||
|
|
||||||
sigc::signal<void> Modified;
|
sigc::signal<void> Changed;
|
||||||
sigc::signal<void, ARDOUR::Bundle::Change> BundleChanged;
|
sigc::signal<void, ARDOUR::Bundle::Change> BundleChanged;
|
||||||
|
|
||||||
struct BundleRecord {
|
struct BundleRecord {
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ PortMatrix::PortMatrix (ARDOUR::Session& session, ARDOUR::DataType type)
|
||||||
_min_height_divisor (1),
|
_min_height_divisor (1),
|
||||||
_show_only_bundles (false),
|
_show_only_bundles (false),
|
||||||
_inhibit_toggle_show_only_bundles (false),
|
_inhibit_toggle_show_only_bundles (false),
|
||||||
_first_setup (true)
|
_realized (false)
|
||||||
{
|
{
|
||||||
_body = new PortMatrixBody (this);
|
_body = new PortMatrixBody (this);
|
||||||
|
|
||||||
|
|
@ -115,7 +115,7 @@ PortMatrix::routes_changed ()
|
||||||
void
|
void
|
||||||
PortMatrix::setup ()
|
PortMatrix::setup ()
|
||||||
{
|
{
|
||||||
if (_first_setup) {
|
if (!_realized) {
|
||||||
select_arrangement ();
|
select_arrangement ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -123,8 +123,6 @@ PortMatrix::setup ()
|
||||||
setup_scrollbars ();
|
setup_scrollbars ();
|
||||||
queue_draw ();
|
queue_draw ();
|
||||||
|
|
||||||
_first_setup = false;
|
|
||||||
|
|
||||||
show_all ();
|
show_all ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -461,3 +459,17 @@ PortMatrix::max_size () const
|
||||||
|
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
PortMatrix::on_realize ()
|
||||||
|
{
|
||||||
|
Widget::on_realize ();
|
||||||
|
_realized = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
PortMatrix::on_unrealize ()
|
||||||
|
{
|
||||||
|
Widget::on_unrealize ();
|
||||||
|
_realized = false;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -160,6 +160,8 @@ private:
|
||||||
void hide_group (boost::weak_ptr<PortGroup>);
|
void hide_group (boost::weak_ptr<PortGroup>);
|
||||||
void show_group (boost::weak_ptr<PortGroup>);
|
void show_group (boost::weak_ptr<PortGroup>);
|
||||||
void toggle_show_only_bundles ();
|
void toggle_show_only_bundles ();
|
||||||
|
void on_realize ();
|
||||||
|
void on_unrealize ();
|
||||||
|
|
||||||
/// port type that we are working with
|
/// port type that we are working with
|
||||||
ARDOUR::DataType _type;
|
ARDOUR::DataType _type;
|
||||||
|
|
@ -175,7 +177,7 @@ private:
|
||||||
int _min_height_divisor;
|
int _min_height_divisor;
|
||||||
bool _show_only_bundles;
|
bool _show_only_bundles;
|
||||||
bool _inhibit_toggle_show_only_bundles;
|
bool _inhibit_toggle_show_only_bundles;
|
||||||
bool _first_setup;
|
bool _realized;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue