fixed crash when importing files without an extension
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 4.6.2, 2018-07-01T04:18:56. -->
|
||||
<!-- Written by QtCreator 4.6.2, 2018-07-01T17:58:13. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
|
||||
@@ -77,6 +77,7 @@ void EffectControls::clear_effects() {
|
||||
}
|
||||
ui->vcontainer->setVisible(false);
|
||||
ui->acontainer->setVisible(false);
|
||||
selected_clips.clear();
|
||||
}
|
||||
|
||||
void EffectControls::deselect_all_effects(QWidget* sender) {
|
||||
@@ -163,10 +164,14 @@ bool EffectControls::is_focused() {
|
||||
if (this->hasFocus()) return true;
|
||||
for (int i=0;i<selected_clips.size();i++) {
|
||||
Clip* c = selected_clips.at(i);
|
||||
for (int j=0;j<c->effects.size();j++) {
|
||||
if (c->effects.at(j)->container->is_focused()) {
|
||||
return true;
|
||||
if (c != NULL) {
|
||||
for (int j=0;j<c->effects.size();j++) {
|
||||
if (c->effects.at(j)->container->is_focused()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
qDebug() << "[WARNING] Tried to check focus of a NULL clip";
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -174,6 +174,9 @@ void Project::process_file_list(QStringList& files) {
|
||||
|
||||
// heuristic to determine whether file is part of an image sequence
|
||||
int lastcharindex = file.lastIndexOf(".")-1;
|
||||
if (lastcharindex == -2) {
|
||||
lastcharindex = file.length() - 1;
|
||||
}
|
||||
if (file[lastcharindex].isDigit()) {
|
||||
bool is_img_sequence = false;
|
||||
QString sequence_test(file);
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
#include <QDragEnterEvent>
|
||||
#include <QMimeData>
|
||||
#include <QDebug>
|
||||
|
||||
SourceTable::SourceTable(QWidget* parent) : QTreeWidget(parent) {
|
||||
sortByColumn(0, Qt::AscendingOrder);
|
||||
@@ -51,6 +52,7 @@ void SourceTable::dropEvent(QDropEvent* event) {
|
||||
if (!urls.isEmpty()) {
|
||||
QStringList paths;
|
||||
for (int i=0;i<urls.size();i++) {
|
||||
qDebug() << urls.at(i).toLocalFile();
|
||||
paths.append(urls.at(i).toLocalFile());
|
||||
}
|
||||
panel_project->process_file_list(paths);
|
||||
|
||||
Reference in New Issue
Block a user