<menuitem action='pitch-shift-region'/>
<menuitem action='transpose-region'/>
<menuitem action='naturalize-region'/>
+ <menuitem action='combine-regions'/>
<menuitem action='split-region'/>
<menuitem action='split-multichannel-region'/>
<menuitem action='remove-region'/>
_view->foreach_selected_regionview (sigc::bind (sigc::ptr_fun (add_region_to_list), &selected_regions, &max_level));
- uint32_t num_joined_regions = playlist->count_joined_regions();
- string name = string_compose (_("%1 compound-%2 (%3)"), playlist->name(), num_joined_regions+1, max_level+1);
-
+ string name = string_compose (_("%1 compound-%2 (%3)"), playlist->name(), playlist->combine_ops()+1, max_level+1);
playlist->clear_changes ();
playlist->join (selected_regions, name);
}
framepos_t find_next_top_layer_position (framepos_t) const;
+ uint32_t combine_ops() const { return _combine_ops; }
protected:
friend class Session;
uint64_t layer_op_counter;
framecnt_t freeze_length;
bool auto_partition;
+ uint32_t _combine_ops;
/** true if relayering should be done using region's current layers and their `pending explicit relayer'
* flags; otherwise false if relayering should be done using the layer-model (most recently moved etc.)
#include <boost/lexical_cast.hpp>
+#include "pbd/convert.h"
#include "pbd/failed_constructor.h"
#include "pbd/stateful_diff_command.h"
#include "pbd/xml++.h"
-#include "pbd/stacktrace.h"
#include "ardour/debug.h"
#include "ardour/playlist.h"
layer_op_counter = 0;
freeze_length = 0;
_explicit_relayering = false;
+ _combine_ops = 0;
_session.history().BeginUndoRedo.connect_same_thread (*this, boost::bind (&Playlist::begin_undo, this));
_session.history().EndUndoRedo.connect_same_thread (*this, boost::bind (&Playlist::end_undo, this));
_orig_diskstream_id = prop->value ();
} else if (prop->name() == X_("frozen")) {
_frozen = string_is_affirmative (prop->value());
+ } else if (prop->name() == X_("combine-ops")) {
+ _combine_ops = atoi (prop->value());
}
}
Playlist::state (bool full_state)
{
XMLNode *node = new XMLNode (X_("Playlist"));
- char buf[64] = "";
+ char buf[64];
node->add_property (X_("id"), id().to_s());
node->add_property (X_("name"), _name);
RegionLock rlock (this, false);
XMLNode* nested_node = 0;
+ snprintf (buf, sizeof (buf), "%u", _combine_ops);
+ node->add_property ("combine-ops", buf);
+
for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) {
if ((*i)->max_source_level() > 0) {
/* add the new region at the right location */
add_region (compound_region, earliest_position);
+ _combine_ops++;
thaw ();
}