mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-01-11 18:57:11 +01:00
more bugfix
This commit is contained in:
parent
5d08f1018d
commit
a487c0aaea
@ -232,7 +232,8 @@ void FrequencySelect::draw() {
|
||||
//ImGui::NewLine();
|
||||
}
|
||||
|
||||
void FrequencySelect::setFrequency(uint64_t freq) {
|
||||
void FrequencySelect::setFrequency(int64_t freq) {
|
||||
freq = std::max<int64_t>(0, freq);
|
||||
int i = 11;
|
||||
for (uint64_t f = freq; i >= 0; i--) {
|
||||
digits[i] = f % 10;
|
||||
|
@ -8,7 +8,7 @@ public:
|
||||
FrequencySelect();
|
||||
void init();
|
||||
void draw();
|
||||
void setFrequency(uint64_t freq);
|
||||
void setFrequency(int64_t freq);
|
||||
|
||||
uint64_t frequency;
|
||||
bool frequencyChanged = false;
|
||||
|
@ -510,7 +510,16 @@ private:
|
||||
ImGui::TableSetColumnIndex(0);
|
||||
ImVec2 min = ImGui::GetCursorPos();
|
||||
|
||||
ImGui::Selectable((name + "##_freq_mgr_bkm_name_" + _this->name).c_str(), &bm.selected, ImGuiSelectableFlags_SpanAllColumns | ImGuiSelectableFlags_SelectOnClick);
|
||||
if (ImGui::Selectable((name + "##_freq_mgr_bkm_name_" + _this->name).c_str(), &bm.selected, ImGuiSelectableFlags_SpanAllColumns | ImGuiSelectableFlags_SelectOnClick)) {
|
||||
// if shift or control isn't pressed, deselect all others
|
||||
if (!ImGui::IsKeyDown(GLFW_KEY_LEFT_SHIFT) && !ImGui::IsKeyDown(GLFW_KEY_RIGHT_SHIFT) &&
|
||||
!ImGui::IsKeyDown(GLFW_KEY_LEFT_CONTROL) && !ImGui::IsKeyDown(GLFW_KEY_RIGHT_CONTROL)) {
|
||||
for (auto& [_name, _bm] : _this->bookmarks) {
|
||||
if (name == _name) { continue; }
|
||||
_bm.selected = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ImGui::TableGetHoveredColumn() >= 0 && ImGui::IsItemHovered() && ImGui::IsMouseDoubleClicked(ImGuiMouseButton_Left)) {
|
||||
applyBookmark(bm, gui::waterfall.selectedVFO);
|
||||
}
|
||||
|
@ -156,11 +156,13 @@ public:
|
||||
// core::setInputSampleRate(sampleRate);
|
||||
|
||||
sigpath::sourceManager.registerSource("SDRplay", &handler);
|
||||
|
||||
initOk = true;
|
||||
}
|
||||
|
||||
~SDRPlaySourceModule() {
|
||||
stop(this);
|
||||
sdrplay_api_Close();
|
||||
if (initOk) { sdrplay_api_Close(); }
|
||||
sigpath::sourceManager.unregisterSource("SDRplay");
|
||||
}
|
||||
|
||||
@ -943,6 +945,7 @@ private:
|
||||
SourceManager::SourceHandler handler;
|
||||
bool running = false;
|
||||
double freq;
|
||||
bool initOk = false;
|
||||
|
||||
sdrplay_api_CallbackFnsT cbFuncs;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user