editor toggle button fix from lincoln; refresh location display when loop range changes; fix up BufferSet::merge_from() to be less fragile to wierd merge conditions

git-svn-id: svn://localhost/ardour2/branches/3.0@5297 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2009-06-29 14:29:53 +00:00
parent 48fc492253
commit 4df4574be4
3 changed files with 14 additions and 7 deletions

View File

@ -364,6 +364,7 @@ void
ActionManager::toggle_config_state (const char* group, const char* action, bool (RCConfiguration::*set)(bool), bool (RCConfiguration::*get)(void) const)
{
Glib::RefPtr<Action> act = ActionManager::get_action (group, action);
if (act) {
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
@ -381,12 +382,15 @@ void
ActionManager::toggle_config_state_foo (const char* group, const char* action, sigc::slot<bool, bool> set, sigc::slot<bool> get)
{
Glib::RefPtr<Action> act = ActionManager::get_action (group, action);
if (act) {
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
if (tact->get_active()) {
if (tact) {
bool const x = get ();
if (x != tact->get_active ()) {
set (x);
set (!x);
}
}
}

View File

@ -4799,6 +4799,7 @@ Editor::post_zoom ()
playhead_cursor->set_position (playhead_cursor->current_frame);
}
refresh_location_display();
_summary->set_overlays_dirty ();
instant_save ();

View File

@ -229,17 +229,19 @@ BufferSet::read_from (BufferSet& in, nframes_t nframes)
void
BufferSet::merge_from (BufferSet& in, nframes_t nframes)
{
assert(available() >= in.count());
/* merge all input buffers into out existing buffers.
NOTE: if "in" contains more buffers than this set,
we will drop the extra buffers.
*/
/* merge all input buffers into out existing buffers */
for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) {
BufferSet::iterator o = begin(*t);
for (BufferSet::iterator i = in.begin(*t); i != in.end(*t); ++i, ++o) {
for (BufferSet::iterator i = in.begin(*t); i != in.end(*t) && o != end (*t); ++i, ++o) {
o->merge_from (*i, nframes);
}
}
set_count (in.count());
}
void