added ability to disable drop-to-replace and fixed tooltip frame rate bug
This commit is contained in:
+6
-1
@@ -27,7 +27,8 @@ Config::Config()
|
||||
autoscale_by_default(false),
|
||||
recording_mode(2),
|
||||
enable_seek_to_import(false),
|
||||
enable_audio_scrubbing(true)
|
||||
enable_audio_scrubbing(true),
|
||||
drop_on_media_to_replace(true)
|
||||
{}
|
||||
|
||||
void Config::load(QString path) {
|
||||
@@ -95,6 +96,9 @@ void Config::load(QString path) {
|
||||
} else if (stream.name() == "AudioScrubbing") {
|
||||
stream.readNext();
|
||||
enable_audio_scrubbing = (stream.text() == "1");
|
||||
} else if (stream.name() == "DropFileOnMediaToReplace") {
|
||||
stream.readNext();
|
||||
drop_on_media_to_replace = (stream.text() == "1");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -138,6 +142,7 @@ void Config::save(QString path) {
|
||||
stream.writeTextElement("RecordingMode", QString::number(recording_mode));
|
||||
stream.writeTextElement("EnableSeekToImport", QString::number(enable_seek_to_import));
|
||||
stream.writeTextElement("AudioScrubbing", QString::number(enable_audio_scrubbing));
|
||||
stream.writeTextElement("DropFileOnMediaToReplace", QString::number(drop_on_media_to_replace));
|
||||
|
||||
stream.writeEndElement(); // configuration
|
||||
stream.writeEndDocument(); // doc
|
||||
|
||||
@@ -34,6 +34,7 @@ struct Config {
|
||||
int recording_mode;
|
||||
bool enable_seek_to_import;
|
||||
bool enable_audio_scrubbing;
|
||||
bool drop_on_media_to_replace;
|
||||
|
||||
void load(QString path);
|
||||
void save(QString path);
|
||||
|
||||
@@ -655,6 +655,7 @@ void MainWindow::toolMenu_About_To_Be_Shown() {
|
||||
ui->actionAuto_scale_by_Default->setChecked(config.autoscale_by_default);
|
||||
ui->actionEnable_Seek_to_Import->setChecked(config.enable_seek_to_import);
|
||||
ui->actionAudio_Scrubbing->setChecked(config.enable_audio_scrubbing);
|
||||
ui->actionEnable_Drop_on_Media_to_Replace->setChecked(config.drop_on_media_to_replace);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionEdit_Tool_Selects_Links_triggered() {
|
||||
@@ -931,3 +932,7 @@ void MainWindow::on_actionNest_triggered() {
|
||||
void MainWindow::on_actionToggle_Show_All_triggered() {
|
||||
if (sequence != NULL) panel_timeline->toggle_show_all();
|
||||
}
|
||||
|
||||
void MainWindow::on_actionEnable_Drop_on_Media_to_Replace_triggered() {
|
||||
config.drop_on_media_to_replace = !config.drop_on_media_to_replace;
|
||||
}
|
||||
|
||||
@@ -201,6 +201,8 @@ private slots:
|
||||
|
||||
void on_actionToggle_Show_All_triggered();
|
||||
|
||||
void on_actionEnable_Drop_on_Media_to_Replace_triggered();
|
||||
|
||||
private:
|
||||
Ui::MainWindow *ui;
|
||||
void setup_layout();
|
||||
|
||||
+10
-1
@@ -33,7 +33,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>653</width>
|
||||
<height>20</height>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menu_File">
|
||||
@@ -183,6 +183,7 @@
|
||||
<addaction name="actionAuto_scale_by_Default"/>
|
||||
<addaction name="actionEnable_Seek_to_Import"/>
|
||||
<addaction name="actionAudio_Scrubbing"/>
|
||||
<addaction name="actionEnable_Drop_on_Media_to_Replace"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionPreferences"/>
|
||||
<addaction name="actionCrash"/>
|
||||
@@ -857,6 +858,14 @@
|
||||
<string>\</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionEnable_Drop_on_Media_to_Replace">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Enable Drop File on Media to Replace</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources/>
|
||||
|
||||
+1
-1
@@ -1648,7 +1648,7 @@ void update_footage_tooltip(QTreeWidgetItem *item, Media *media, QString error)
|
||||
if (i > 0) {
|
||||
tooltip += ", ";
|
||||
}
|
||||
if (media->video_tracks.at(i)->video_interlacing != VIDEO_PROGRESSIVE) {
|
||||
if (media->video_tracks.at(i)->video_interlacing == VIDEO_PROGRESSIVE) {
|
||||
tooltip += QString::number(media->video_tracks.at(i)->video_frame_rate);
|
||||
} else {
|
||||
tooltip += QString::number(media->video_tracks.at(i)->video_frame_rate * 2);
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "project/undo.h"
|
||||
#include "project/sequence.h"
|
||||
#include "mainwindow.h"
|
||||
#include "io/config.h"
|
||||
|
||||
#include <QDragEnterEvent>
|
||||
#include <QMimeData>
|
||||
@@ -237,6 +238,7 @@ void SourceTable::dropEvent(QDropEvent* event) {
|
||||
&& drop_item != NULL
|
||||
&& get_type_from_tree(drop_item) == MEDIA_TYPE_FOOTAGE
|
||||
&& !QFileInfo(paths.at(0)).isDir()
|
||||
&& config.drop_on_media_to_replace
|
||||
&& QMessageBox::question(this, "Replace Media", "You dropped a file onto '" + drop_item->text(0) + "'. Would you like to replace it with the dropped file?", QMessageBox::Yes | QMessageBox::No, QMessageBox::No) == QMessageBox::Yes) {
|
||||
replace = true;
|
||||
panel_project->replace_media(drop_item, paths.at(0));
|
||||
|
||||
Reference in New Issue
Block a user