Commit 559a8e74 authored by Alexander Stippich's avatar Alexander Stippich
Browse files

set initial values for the scan thread

otherwise, they will not be taken into account unless they are changed by the user
parent 6db07653
......@@ -204,9 +204,17 @@ KSaneCore::KSaneOpenStatus KSaneCorePrivate::loadDeviceOptions()
// Create the scan thread
m_scanThread = new KSaneScanThread(m_saneHandle);
connect(m_scanThread, &KSaneScanThread::finished, this, &KSaneCorePrivate::imageScanFinished);
m_scanThread->setImageInverted(invertOption->value());
connect(invertOption, &KSaneInvertOption::valueChanged, m_scanThread, &KSaneScanThread::setImageInverted);
if (optionResolution != nullptr) {
m_scanThread->setImageResolution(optionResolution->value());
connect(optionResolution, &KSaneBaseOption::valueChanged, m_scanThread, &KSaneScanThread::setImageResolution);
}
connect(m_scanThread, &KSaneScanThread::scanProgressUpdated, q, &KSaneCore::scanProgress);
connect(m_scanThread, &KSaneScanThread::finished, this, &KSaneCorePrivate::imageScanFinished);
// try to set to default values
setDefaultValues();
......
Supports Markdown
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