merged master and fixed superimpose effect
This commit is contained in:
+13
-31
@@ -111,7 +111,7 @@ Project::Project(QWidget *parent) :
|
||||
QPushButton* toolbar_open = new QPushButton();
|
||||
toolbar_open->setIcon(olive::icon::CreateIconFromSVG(QStringLiteral(":/icons/open.svg")));
|
||||
toolbar_open->setToolTip("Open Project");
|
||||
connect(toolbar_open, SIGNAL(clicked(bool)), olive::Global.get(), SLOT(open_project()));
|
||||
connect(toolbar_open, SIGNAL(clicked(bool)), olive::Global.get(), SLOT(OpenProject()));
|
||||
toolbar->addWidget(toolbar_open);
|
||||
|
||||
QPushButton* toolbar_save = new QPushButton();
|
||||
@@ -433,27 +433,30 @@ void Project::new_sequence() {
|
||||
}
|
||||
|
||||
MediaPtr Project::create_sequence_internal(ComboAction *ca, SequencePtr s, bool open, Media* parent) {
|
||||
if (parent == nullptr) {
|
||||
parent = olive::project_model.get_root();
|
||||
}
|
||||
|
||||
MediaPtr item = std::make_shared<Media>(parent);
|
||||
MediaPtr item = std::make_shared<Media>();
|
||||
item->set_sequence(s);
|
||||
|
||||
if (ca != nullptr) {
|
||||
|
||||
ca->append(new AddMediaCommand(item, parent));
|
||||
|
||||
if (open) {
|
||||
ca->append(new ChangeSequenceAction(s));
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
olive::project_model.appendChild(parent, item);
|
||||
|
||||
if (open) {
|
||||
olive::Global->set_sequence(s);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return item;
|
||||
|
||||
}
|
||||
|
||||
QString Project::get_file_name_from_path(const QString& path) {
|
||||
@@ -700,14 +703,14 @@ void Project::process_file_list(QStringList& files, bool recursive, MediaPtr rep
|
||||
subdir_filenames.append(subdir_files.at(j).filePath());
|
||||
}
|
||||
|
||||
process_file_list(subdir_filenames, true, nullptr, folder.get());
|
||||
|
||||
if (create_undo_action) {
|
||||
ca->append(new AddMediaCommand(folder, parent));
|
||||
} else {
|
||||
olive::project_model.appendChild(parent, folder);
|
||||
}
|
||||
|
||||
process_file_list(subdir_filenames, true, nullptr, folder.get());
|
||||
|
||||
imported = true;
|
||||
|
||||
} else if (!files.at(i).isEmpty()) {
|
||||
@@ -724,7 +727,7 @@ void Project::process_file_list(QStringList& files, bool recursive, MediaPtr rep
|
||||
QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {
|
||||
|
||||
// load the project without clearing the current one
|
||||
load_project(file, false, false);
|
||||
olive::Global->ImportProject(file);
|
||||
|
||||
}
|
||||
|
||||
@@ -868,7 +871,7 @@ void Project::process_file_list(QStringList& files, bool recursive, MediaPtr rep
|
||||
if (replace != nullptr) {
|
||||
item = replace;
|
||||
} else {
|
||||
item = std::make_shared<Media>(parent);
|
||||
item = std::make_shared<Media>();
|
||||
}
|
||||
|
||||
m = std::make_shared<Footage>();
|
||||
@@ -891,7 +894,7 @@ void Project::process_file_list(QStringList& files, bool recursive, MediaPtr rep
|
||||
if (create_undo_action) {
|
||||
ca->append(new AddMediaCommand(item, parent));
|
||||
} else {
|
||||
parent->appendChild(item);
|
||||
olive::project_model.appendChild(parent, item);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1046,27 +1049,6 @@ void Project::clear() {
|
||||
tree_view->update();
|
||||
}
|
||||
|
||||
void Project::new_project() {
|
||||
// clear existing project
|
||||
olive::Global->set_sequence(nullptr);
|
||||
panel_footage_viewer->set_media(nullptr);
|
||||
clear();
|
||||
olive::Global->set_modified(false);
|
||||
}
|
||||
|
||||
void Project::load_project(const QString& filename, bool autorecovery, bool clear) {
|
||||
|
||||
// Normally, the user will be closing the previous project to load a new one, but just in case the user
|
||||
// is importing a new project
|
||||
|
||||
if (clear) {
|
||||
new_project();
|
||||
}
|
||||
|
||||
LoadDialog ld(this, filename, autorecovery, clear);
|
||||
ld.exec();
|
||||
}
|
||||
|
||||
void save_marker(QXmlStreamWriter& stream, const Marker& m) {
|
||||
stream.writeStartElement("marker");
|
||||
stream.writeAttribute("frame", QString::number(m.frame));
|
||||
|
||||
Reference in New Issue
Block a user