Veto window closure during scanner discovery in the background.

This commit is contained in:
Saleem Edah-Tally
2025-07-13 20:24:50 +02:00
parent 0f286efe4c
commit c10aac922d
6 changed files with 46 additions and 7 deletions

View File

@@ -23,7 +23,7 @@
#include <memory>
#include <vector>
class BackgroundScannerDiscoveryEVH;
class BackgroundScannerDiscovery; // Is a wxThread.
class ScanProjectHandler; // An event handler extending InsaneWorkerEvent.
class XStampWidget;
struct StampDescriptor;
@@ -66,6 +66,7 @@ public:
void CancelScanning();
void EnableScanButton(bool enable); // For CallAfter.
void Setup(wxConfig * config, TimeredStatusBar * sb);
bool IsScannerDiscoveryRunning();
private:
wxConfig * m_config;
wxWeakRef<TimeredStatusBar> m_sb;
@@ -81,7 +82,7 @@ private:
// Available devices and minimal options.
std::unique_ptr<XScannerWidget> m_scannerWidget;
std::unique_ptr<InsaneWorker> m_insaneWorker;
std::unique_ptr<BackgroundScannerDiscoveryEVH> m_backgroundScannerDiscoveryEvh;
BackgroundScannerDiscovery * m_backgroundDiscovery;
std::unique_ptr<ScanProjectHandler> m_scanProject;
bool m_doubleSided = false;