GUI: merge: fix infinite loop adding new settings after dropping files

This commit is contained in:
Moritz Bunkus 2015-09-18 19:48:10 +02:00
parent 80727a50c7
commit cf975b3176
3 changed files with 7 additions and 1 deletions

View File

@ -788,6 +788,11 @@ Tab::addOrAppendFiles(bool append) {
addOrAppendFiles(append, fileNames, selectedSourceFile());
}
void
Tab::addFiles(QStringList const &fileNames) {
addOrAppendFiles(false, fileNames, QModelIndex{});
}
void
Tab::addOrAppendFiles(bool append,
QStringList const &fileNames,

View File

@ -63,6 +63,7 @@ public:
virtual QString title() const;
virtual void load(QString const &fileName);
virtual void cloneConfig(MuxConfig const &config);
virtual void addFiles(QStringList const &fileNames);
signals:
void removeThisTab();

View File

@ -329,7 +329,7 @@ Tool::addMultipleFilesToNewSettings(QStringList const &fileNames,
auto tab = currentTab();
Q_ASSERT(!!tab);
tab->addFilesToBeAddedOrAppendedDelayed(fileNamesToAdd);
tab->addFiles(fileNamesToAdd);
}
}