diff --git a/kstars/ekos/align/align.cpp b/kstars/ekos/align/align.cpp index 0d41663c18..ce3f251cf6 100644 --- a/kstars/ekos/align/align.cpp +++ b/kstars/ekos/align/align.cpp @@ -3086,8 +3086,8 @@ bool Align::loadAndSlew(const QByteArray &image, const QString &extension) m_ImageData.clear(); QSharedPointer data; data.reset(new FITSData(), &QObject::deleteLater); - data->loadFromBuffer(image); data->setExtension(extension); + data->loadFromBuffer(image); m_AlignView->loadData(data); startSolving(); return true; diff --git a/kstars/ekos/auxiliary/darklibrary.cpp b/kstars/ekos/auxiliary/darklibrary.cpp index b07c0f51c0..411607b397 100644 --- a/kstars/ekos/auxiliary/darklibrary.cpp +++ b/kstars/ekos/auxiliary/darklibrary.cpp @@ -532,11 +532,10 @@ void DarkLibrary::updateProperty(INDI::Property prop) return; auto bp = prop.getBLOB()->at(0); + m_CurrentDarkFrame->setExtension(QString(bp->getFormat())); QByteArray buffer = QByteArray::fromRawData(reinterpret_cast(bp->getBlob()), bp->getSize()); if (!m_CurrentDarkFrame->loadFromBuffer(buffer)) { - QString ext(QString(bp->getFormat())); - m_CurrentDarkFrame->setExtension(ext); m_FileLabel->setText(i18n("Failed to process dark data.")); return; } diff --git a/kstars/ekos/guide/externalguide/phd2.cpp b/kstars/ekos/guide/externalguide/phd2.cpp index 00e7fc45d3..cc250c4760 100644 --- a/kstars/ekos/guide/externalguide/phd2.cpp +++ b/kstars/ekos/guide/externalguide/phd2.cpp @@ -1090,8 +1090,8 @@ void PHD2::processStarImage(const QJsonObject &jsonStarFrame) QSharedPointer fdata; QByteArray buffer = QByteArray::fromRawData(reinterpret_cast(fits_buffer), fits_buffer_size); fdata.reset(new FITSData(), &QObject::deleteLater); - fdata->loadFromBuffer(buffer); fdata->setExtension(QString("fits")); + fdata->loadFromBuffer(buffer); free(fits_buffer); m_GuideFrame->loadData(fdata);