mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2026-06-01 21:54:39 -04:00
Fix bad 'SoapySDR missing' modal dialog thread call
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
|
||||
SDRDevicesDialog::SDRDevicesDialog( wxWindow* parent ): devFrame( parent ) {
|
||||
refresh = true;
|
||||
failed = false;
|
||||
m_addRemoteButton->Disable();
|
||||
m_useSelectedButton->Disable();
|
||||
m_deviceTimer.Start(250);
|
||||
@@ -229,6 +230,16 @@ void SDRDevicesDialog::OnTreeDoubleClick( wxMouseEvent& event ) {
|
||||
|
||||
void SDRDevicesDialog::OnDeviceTimer( wxTimerEvent& event ) {
|
||||
if (refresh) {
|
||||
if (wxGetApp().areModulesMissing()) {
|
||||
if (!failed) {
|
||||
wxMessageDialog *info;
|
||||
info = new wxMessageDialog(NULL, wxT("\nNo SoapySDR modules were found.\n\nCubicSDR requires at least one SoapySDR device support module to be installed.\n\nPlease visit https://github.com/cjcliffe/CubicSDR/wiki and in the build instructions for your platform read the 'Support Modules' section for more information."), wxT("\x28\u256F\xB0\u25A1\xB0\uFF09\u256F\uFE35\x20\u253B\u2501\u253B"), wxOK | wxICON_ERROR);
|
||||
info->ShowModal();
|
||||
failed = true;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (wxGetApp().areDevicesEnumerating() || !wxGetApp().areDevicesReady()) {
|
||||
std::string msg = wxGetApp().getNotification();
|
||||
devStatusBar->SetStatusText(msg);
|
||||
@@ -237,7 +248,7 @@ void SDRDevicesDialog::OnDeviceTimer( wxTimerEvent& event ) {
|
||||
event.Skip();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
devTree->DeleteAllItems();
|
||||
|
||||
wxTreeItemId devRoot = devTree->AddRoot("Devices");
|
||||
|
||||
@@ -23,7 +23,7 @@ private:
|
||||
SDRDeviceInfo *getSelectedDevice(wxTreeItemId selId);
|
||||
wxPGProperty *addArgInfoProperty(wxPropertyGrid *pg, SoapySDR::ArgInfo arg);
|
||||
|
||||
bool refresh;
|
||||
bool refresh, failed;
|
||||
std::map<std::string, std::vector<SDRDeviceInfo *>* > devs;
|
||||
std::vector<SDRDeviceInfo *>::iterator devs_i;
|
||||
std::map<wxTreeItemId, SDRDeviceInfo *> devItems;
|
||||
|
||||
Reference in New Issue
Block a user