fixed a few usability issues

This commit is contained in:
itsmattkc
2018-07-19 02:48:29 +01:00
parent 735a53720b
commit a0d97bbb2e
4 changed files with 10 additions and 7 deletions
+2
View File
@@ -10,6 +10,8 @@ int main(int argc, char *argv[])
// init ffmpeg subsystem
av_register_all();
QApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true);
QApplication a(argc, argv);
MainWindow w;
w.show();
+3 -3
View File
@@ -110,7 +110,7 @@ MainWindow::MainWindow(QWidget *parent) :
panel_project->load_project();
}
}
autorecovery_timer.setInterval(60000);
autorecovery_timer.setInterval(10000);
QObject::connect(&autorecovery_timer, SIGNAL(timeout()), this, SLOT(autorecover_interval()));
autorecovery_timer.start();
@@ -291,13 +291,13 @@ void MainWindow::on_action_Paste_triggered()
}
void MainWindow::autorecover_interval() {
if (!project_changed) {
if (project_changed) {
QString old_filename = project_url;
project_url = autorecovery_filename;
panel_project->save_project();
qDebug() << "[INFO] Auto-recovery project saved";
project_url = old_filename;
project_changed = false;
project_changed = true;
}
}
+4 -3
View File
@@ -198,8 +198,9 @@ void Project::delete_selected_media() {
confirm.setWindowTitle("Delete media in use?");
confirm.setText("The media '" + media->name + "' is currently used in '" + s->name + "'. Deleting it will remove all instances in the sequence. Are you sure you want to do this?");
QAbstractButton* yes_button = confirm.addButton(QMessageBox::Yes);
QAbstractButton* skip_button = confirm.addButton("Skip", QMessageBox::NoRole);
QAbstractButton* abort_button = confirm.addButton(QMessageBox::Abort);
QAbstractButton* skip_button = NULL;
if (items.size() > 1) skip_button = confirm.addButton("Skip", QMessageBox::NoRole);
QAbstractButton* abort_button = confirm.addButton(QMessageBox::Cancel);
confirm.exec();
if (confirm.clickedButton() == yes_button) {
// remove all clips referencing this media
@@ -885,7 +886,7 @@ void Project::add_recent_project(QString url) {
#define THROBBER_LIMIT 20
#define THROBBER_SIZE 50
MediaThrobber::MediaThrobber(QTreeWidgetItem* i) : pixmap(":/icons/throbber.png"), item(i), animation(0) {
MediaThrobber::MediaThrobber(QTreeWidgetItem* i) : pixmap(":/icons/throbber.png"), animation(0), item(i) {
// set up throbber
animation_update();
animator.setInterval(20);
+1 -1
View File
@@ -77,7 +77,7 @@ void Timeline::go_to_start() {
}
void Timeline::previous_frame() {
seek(playhead-1);
if (playhead > 0) seek(playhead-1);
}
void Timeline::next_frame() {