Commit 0be92fe6 authored by Elvis Angelaccio's avatar Elvis Angelaccio

part: fix regression when adding files to a new archive

The m_archiveIsLoaded boolean is not really necessary and it was wrongly
set to false when creating a new archive from Ark.

Closes T3703
parent cf26f62b
......@@ -88,7 +88,6 @@ Part::Part(QWidget *parentWidget, QObject *parent, const QVariantList& args)
: KParts::ReadWritePart(parent),
m_splitter(Q_NULLPTR),
m_busy(false),
m_archiveIsLoaded(false),
m_jobTracker(Q_NULLPTR)
{
Q_UNUSED(args)
......@@ -833,7 +832,6 @@ void Part::slotLoadingFinished(KJob *job)
// The file failed to open, so reset the open archive, info panel and caption.
m_model->setArchive(Q_NULLPTR);
m_archiveIsLoaded = false;
m_infoPanel->setPrettyFileName(QString());
m_infoPanel->updateWithDefaults();
......@@ -841,9 +839,6 @@ void Part::slotLoadingFinished(KJob *job)
emit setWindowCaption(QString());
}
}
else {
m_archiveIsLoaded = true;
}
m_view->sortByColumn(0, Qt::AscendingOrder);
......@@ -1251,7 +1246,7 @@ void Part::adjustColumns()
void Part::slotAddFiles(const QStringList& filesToAdd, const Archive::Entry *destination, const QString &relPath)
{
if (!m_archiveIsLoaded || filesToAdd.isEmpty()) {
if (!m_model->archive() || filesToAdd.isEmpty()) {
return;
}
......
......@@ -196,7 +196,7 @@ private:
QSplitter *m_splitter;
QList<QTemporaryDir*> m_tmpExtractDirList;
bool m_busy;
bool m_archiveIsLoaded;
OpenFileMode m_openFileMode;
QUrl m_lastUsedAddPath;
QList<Kerfuffle::Archive::Entry*> m_jobTempEntries;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment