along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id$
*/
#include <unistd.h>
}
}
+/** Export the first selected region */
void
Editor::export_region ()
{
- if (clicked_regionview == 0) {
+ if (selection->regions.empty()) {
return;
}
- ExportDialog* dialog = new ExportRegionDialog (*this, clicked_regionview->region());
+ boost::shared_ptr<Region> r = selection->regions.front()->region();
+
+ ExportDialog* dialog = new ExportRegionDialog (*this, r);
dialog->connect_to_session (session);
- dialog->set_range (
- clicked_regionview->region()->first_frame(),
- clicked_regionview->region()->last_frame());
+ dialog->set_range (r->first_frame(), r->last_frame());
dialog->start_export();
}
string path;
vector<boost::shared_ptr<AudioFileSource> > sources;
- uint32_t channels = count.get(DataType::AUDIO);
+ uint32_t channels = count.n_audio();
for (uint32_t n=0; n < channels; ++n) {