merged with master

This commit is contained in:
itsmattkc
2019-03-25 12:43:23 +11:00
83 changed files with 7823 additions and 1469 deletions
+23 -5
View File
@@ -118,11 +118,26 @@ void TimelineWidget::show_context_menu(const QPoint& pos) {
if (!selected_clips.isEmpty()) {
bool video_clips_are_selected = false;
bool audio_clips_are_selected = false;
for (int i=0;i<selected_clips.size();i++) {
if (selected_clips.at(i)->track() < 0) {
video_clips_are_selected = true;
} else {
audio_clips_are_selected = true;
}
}
menu.addSeparator();
menu.addAction(tr("&Speed/Duration"), olive::Global.get(), SLOT(open_speed_dialog()));
QAction* autoscaleAction = menu.addAction(tr("Auto-s&cale"), this, SLOT(toggle_autoscale()));
if (audio_clips_are_selected) {
menu.addAction(tr("Auto-Cut Silence"), olive::Global.get(), SLOT(open_autocut_silence_dialog()));
}
QAction* autoscaleAction = menu.addAction(tr("Auto-S&cale"), this, SLOT(toggle_autoscale()));
autoscaleAction->setCheckable(true);
// set autoscale to the first selected clip
autoscaleAction->setChecked(selected_clips.at(0)->autoscaled());
@@ -237,10 +252,10 @@ bool same_sign(int a, int b) {
void TimelineWidget::dragEnterEvent(QDragEnterEvent *event) {
bool import_init = false;
QVector<Media*> media_list;
QVector<olive::timeline::MediaImportData> media_list;
panel_timeline->importing_files = false;
if (event->source() == panel_project->tree_view || event->source() == panel_project->icon_view) {
if (panel_project->IsProjectWidget(event->source())) {
QModelIndexList items = panel_project->get_current_selected();
media_list.resize(items.size());
for (int i=0;i<items.size();i++) {
@@ -249,10 +264,13 @@ void TimelineWidget::dragEnterEvent(QDragEnterEvent *event) {
import_init = true;
}
if (event->source() == panel_footage_viewer->viewer_widget) {
if (event->source() == panel_footage_viewer) {
if (panel_footage_viewer->seq != olive::ActiveSequence) { // don't allow nesting the same sequence
media_list.append(panel_footage_viewer->media);
media_list.append(olive::timeline::MediaImportData(panel_footage_viewer->media,
static_cast<olive::timeline::MediaImportType>(event->mimeData()->text().toInt())));
import_init = true;
}
}