diff --git a/CMakeLists.txt b/CMakeLists.txt index 7ab69463..4d37b59c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,8 +6,8 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/") SET(CUBICSDR_VERSION_MAJOR "0") SET(CUBICSDR_VERSION_MINOR "2") -SET(CUBICSDR_VERSION_PATCH "5") -SET(CUBICSDR_VERSION_SUFFIX "") +SET(CUBICSDR_VERSION_PATCH "6") +SET(CUBICSDR_VERSION_SUFFIX "a") SET(CUBICSDR_VERSION "${CUBICSDR_VERSION_MAJOR}.${CUBICSDR_VERSION_MINOR}.${CUBICSDR_VERSION_PATCH}${CUBICSDR_VERSION_SUFFIX}") SET(CPACK_PACKAGE_VERSION "${CUBICSDR_VERSION_MAJOR}.${CUBICSDR_VERSION_MINOR}.${CUBICSDR_VERSION_PATCH}") diff --git a/external/msvc/x64/vc_redist.x64.exe b/external/msvc/x64/vc_redist.x64.exe index 02bda21d..4fac196d 100644 Binary files a/external/msvc/x64/vc_redist.x64.exe and b/external/msvc/x64/vc_redist.x64.exe differ diff --git a/external/msvc/x86/vc_redist.x86.exe b/external/msvc/x86/vc_redist.x86.exe index 2b89c83b..0319b7ba 100644 Binary files a/external/msvc/x86/vc_redist.x86.exe and b/external/msvc/x86/vc_redist.x86.exe differ diff --git a/src/AppFrame.cpp b/src/AppFrame.cpp index 90a10c83..1dc2c8a6 100644 --- a/src/AppFrame.cpp +++ b/src/AppFrame.cpp @@ -2769,15 +2769,19 @@ FrequencyDialog::FrequencyDialogTarget AppFrame::getFrequencyDialogTarget() { return target; } -void AppFrame::gkNudgeLeft(DemodulatorInstancePtr demod, int snap) { +void AppFrame::gkNudge(DemodulatorInstancePtr demod, int snap) { if (demod) { - demod->setFrequency(demod->getFrequency()-snap); - demod->updateLabel(demod->getFrequency()); - } -} + auto demodFreq = demod->getFrequency()+snap; + auto demodBw = demod->getBandwidth(); + + auto ctr = wxGetApp().getFrequency(); + auto bw = wxGetApp().getSampleRate(); + + // Don't let it get nudged out of view. + if (ctr - (bw / 2) > (demodFreq - demodBw / 2) || ctr + (bw / 2) < (demodFreq + demodBw / 2)) { + wxGetApp().setFrequency(ctr+(snap*2)); + } -void AppFrame::gkNudgeRight(DemodulatorInstancePtr demod, int snap) { - if (demod) { demod->setFrequency(demod->getFrequency()+snap); demod->updateLabel(demod->getFrequency()); } @@ -2821,10 +2825,10 @@ int AppFrame::OnGlobalKeyDown(wxKeyEvent &event) { #ifdef wxHAS_RAW_KEY_CODES switch (event.GetRawKeyCode()) { case 30: - gkNudgeRight(lastDemod, snap); + gkNudge(lastDemod, snap); return 1; case 33: - gkNudgeLeft(lastDemod, snap); + gkNudge(lastDemod, -snap); return 1; } #endif @@ -2844,10 +2848,10 @@ int AppFrame::OnGlobalKeyDown(wxKeyEvent &event) { case 'V': return 1; case ']': - gkNudgeRight(lastDemod, snap); + gkNudge(lastDemod, snap); return 1; case '[': - gkNudgeLeft(lastDemod, snap); + gkNudge(lastDemod, -snap); return 1; case 'A': case 'F': @@ -2858,6 +2862,18 @@ int AppFrame::OnGlobalKeyDown(wxKeyEvent &event) { case 'M': case 'R': return 1; + case WXK_NUMPAD0: + case WXK_NUMPAD1: + case WXK_NUMPAD2: + case WXK_NUMPAD3: + case WXK_NUMPAD4: + case WXK_NUMPAD5: + case WXK_NUMPAD6: + case WXK_NUMPAD7: + case WXK_NUMPAD8: + case WXK_NUMPAD9: + wxGetApp().showFrequencyInput(getFrequencyDialogTarget(), std::to_string(event.GetKeyCode() - WXK_NUMPAD0)); + return 1; case '0': case '1': case '2': diff --git a/src/AppFrame.h b/src/AppFrame.h index b2c7c95b..8a5f71b0 100644 --- a/src/AppFrame.h +++ b/src/AppFrame.h @@ -197,8 +197,7 @@ class AppFrame: public wxFrame { /** * Keyboard handlers */ - void gkNudgeLeft(DemodulatorInstancePtr demod, int snap); - void gkNudgeRight(DemodulatorInstancePtr demod, int snap); + void gkNudge(DemodulatorInstancePtr demod, int snap); void toggleActiveDemodRecording(); void toggleAllActiveDemodRecording(); diff --git a/src/CubicSDR.cpp b/src/CubicSDR.cpp index 20a46584..9bc0a3c4 100644 --- a/src/CubicSDR.cpp +++ b/src/CubicSDR.cpp @@ -945,11 +945,12 @@ void CubicSDR::showFrequencyInput(FrequencyDialog::FrequencyDialogTarget targetM const wxString gainTitle("Gain Entry: "+wxGetApp().getActiveGainEntry()); wxString title; - + auto activeModem = demodMgr.getActiveContextModem(); + switch (targetMode) { case FrequencyDialog::FDIALOG_TARGET_DEFAULT: case FrequencyDialog::FDIALOG_TARGET_FREQ: - title = demodMgr.getActiveContextModem()?demodTitle:freqTitle; + title = activeModem ?demodTitle:freqTitle; break; case FrequencyDialog::FDIALOG_TARGET_BANDWIDTH: title = bwTitle; @@ -969,8 +970,8 @@ void CubicSDR::showFrequencyInput(FrequencyDialog::FrequencyDialogTarget targetM default: break; } - - FrequencyDialog fdialog(appframe, -1, title, demodMgr.getActiveContextModem(), wxPoint(-100,-100), wxSize(350, 75), wxDEFAULT_DIALOG_STYLE, targetMode, initString); + + FrequencyDialog fdialog(appframe, -1, title, activeModem, wxPoint(-100,-100), wxSize(350, 75), wxDEFAULT_DIALOG_STYLE, targetMode, initString); fdialog.ShowModal(); } diff --git a/src/FrequencyDialog.cpp b/src/FrequencyDialog.cpp index fe55cfab..3893d0d9 100644 --- a/src/FrequencyDialog.cpp +++ b/src/FrequencyDialog.cpp @@ -97,7 +97,7 @@ void FrequencyDialog::OnChar(wxKeyEvent& event) { } } - if (targetMode == FDIALOG_TARGET_DEFAULT) { + if (targetMode == FDIALOG_TARGET_DEFAULT || targetMode == FDIALOG_TARGET_FREQ) { if (ranged) { freq = strToFrequency(strValue); freq2 = strToFrequency(strValue2); @@ -105,10 +105,16 @@ void FrequencyDialog::OnChar(wxKeyEvent& event) { freq = strToFrequency(strValue); } if (activeDemod) { - activeDemod->setTracking(true); - activeDemod->setFollow(true); activeDemod->setFrequency(freq); activeDemod->updateLabel(freq); + + freq_ctr = wxGetApp().getFrequency(); + range_bw = wxGetApp().getSampleRate(); + + if (freq_ctr - (range_bw / 2) > freq || freq_ctr + (range_bw / 2) < freq) { + wxGetApp().setFrequency(freq); + } + } else { if (ranged && (freq || freq2)) { if (freq > freq2) { diff --git a/src/forms/Bookmark/BookmarkPanel.cpp b/src/forms/Bookmark/BookmarkPanel.cpp index bbe874a6..4f45fc7e 100644 --- a/src/forms/Bookmark/BookmarkPanel.cpp +++ b/src/forms/Bookmark/BookmarkPanel.cpp @@ -93,6 +93,7 @@ BookmarkPanel::BookmarkPanel( wxWindow* parent, wxWindowID id, const wxPoint& po m_searchText->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( BookmarkPanel::onSearchText ), NULL, this ); m_clearSearchButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BookmarkPanel::onClearSearch ), NULL, this ); m_treeView->Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( BookmarkPanel::onEnterWindow ), NULL, this ); + m_treeView->Connect( wxEVT_KEY_UP, wxKeyEventHandler( BookmarkPanel::onKeyUp ), NULL, this ); m_treeView->Connect( wxEVT_LEAVE_WINDOW, wxMouseEventHandler( BookmarkPanel::onLeaveWindow ), NULL, this ); m_treeView->Connect( wxEVT_MOTION, wxMouseEventHandler( BookmarkPanel::onMotion ), NULL, this ); m_treeView->Connect( wxEVT_COMMAND_TREE_BEGIN_DRAG, wxTreeEventHandler( BookmarkPanel::onTreeBeginDrag ), NULL, this ); @@ -120,6 +121,7 @@ BookmarkPanel::~BookmarkPanel() m_searchText->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( BookmarkPanel::onSearchText ), NULL, this ); m_clearSearchButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BookmarkPanel::onClearSearch ), NULL, this ); m_treeView->Disconnect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( BookmarkPanel::onEnterWindow ), NULL, this ); + m_treeView->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( BookmarkPanel::onKeyUp ), NULL, this ); m_treeView->Disconnect( wxEVT_LEAVE_WINDOW, wxMouseEventHandler( BookmarkPanel::onLeaveWindow ), NULL, this ); m_treeView->Disconnect( wxEVT_MOTION, wxMouseEventHandler( BookmarkPanel::onMotion ), NULL, this ); m_treeView->Disconnect( wxEVT_COMMAND_TREE_BEGIN_DRAG, wxTreeEventHandler( BookmarkPanel::onTreeBeginDrag ), NULL, this ); diff --git a/src/forms/Bookmark/BookmarkPanel.fbp b/src/forms/Bookmark/BookmarkPanel.fbp index de4f8f6f..4cbe6094 100644 --- a/src/forms/Bookmark/BookmarkPanel.fbp +++ b/src/forms/Bookmark/BookmarkPanel.fbp @@ -27,7 +27,7 @@ UI 0 0 - + 0 wxAUI_MGR_DEFAULT @@ -52,16 +52,16 @@ onEnterWindow onLeaveWindow onMotion - + bSizer1 wxVERTICAL none - + 5 wxALL|wxEXPAND 0 - + 1 1 1 @@ -123,11 +123,11 @@ onSearchText - + 5 wxALL|wxEXPAND 0 - + 1 1 1 @@ -196,11 +196,11 @@ onClearSearch - + 5 wxEXPAND 1 - + 1 1 1 @@ -253,6 +253,7 @@ onEnterWindow + onKeyUp onLeaveWindow onMotion onTreeBeginDrag @@ -266,11 +267,11 @@ onTreeSelectChanging - + 5 wxEXPAND 0 - + 1 1 1 @@ -324,11 +325,11 @@ - + 5 wxALL|wxEXPAND 0 - + 1 1 1 @@ -888,11 +889,11 @@ - + 5 wxALL|wxEXPAND 0 - + 1 1 1 @@ -952,7 +953,7 @@ - + 0 wxID_ANY m_updateTimer diff --git a/src/forms/Bookmark/BookmarkPanel.h b/src/forms/Bookmark/BookmarkPanel.h index 235f63e8..b02e9c17 100644 --- a/src/forms/Bookmark/BookmarkPanel.h +++ b/src/forms/Bookmark/BookmarkPanel.h @@ -60,6 +60,7 @@ class BookmarkPanel : public wxPanel virtual void onSearchTextFocus( wxMouseEvent& event ) { event.Skip(); } virtual void onSearchText( wxCommandEvent& event ) { event.Skip(); } virtual void onClearSearch( wxCommandEvent& event ) { event.Skip(); } + virtual void onKeyUp( wxKeyEvent& event ) { event.Skip(); } virtual void onTreeBeginDrag( wxTreeEvent& event ) { event.Skip(); } virtual void onTreeEndDrag( wxTreeEvent& event ) { event.Skip(); } virtual void onTreeActivate( wxTreeEvent& event ) { event.Skip(); } diff --git a/src/forms/Bookmark/BookmarkView.cpp b/src/forms/Bookmark/BookmarkView.cpp index 4b2d8ab6..a4d59ba2 100644 --- a/src/forms/Bookmark/BookmarkView.cpp +++ b/src/forms/Bookmark/BookmarkView.cpp @@ -517,29 +517,73 @@ void BookmarkView::doUpdateActiveList() { } -void BookmarkView::onTreeActivate( wxTreeEvent& event ) { +void BookmarkView::onKeyUp( wxKeyEvent& event ) { + // Check for active selection + wxTreeItemId itm = m_treeView->GetSelection(); - wxTreeItemId itm = event.GetItem(); - TreeViewItem* tvi = dynamic_cast(m_treeView->GetItemData(itm)); + if (itm == nullptr) { + event.Skip(); + return; + } + + // Create event to pass to appropriate function + wxTreeEvent treeEvent; + treeEvent.SetItem(itm); - if (tvi) { + // Pull TreeViewItem data + auto tvi = dynamic_cast(m_treeView->GetItemData(itm)); + + // Not selected? + if (tvi == nullptr) { + event.Skip(); + return; + } + + // Handlers + if (event.m_keyCode == WXK_DELETE || event.m_keyCode == WXK_NUMPAD_DELETE) { if (tvi->type == TreeViewItem::TREEVIEW_ITEM_TYPE_ACTIVE) { - if (!tvi->demod->isActive()) { - wxGetApp().setFrequency(tvi->demod->getFrequency()); - nextDemod = tvi->demod; - wxGetApp().getDemodMgr().setActiveDemodulator(nextDemod, false); - } + onRemoveActive(treeEvent); } else if (tvi->type == TreeViewItem::TREEVIEW_ITEM_TYPE_RECENT) { - - nextEnt = tvi->bookmarkEnt; - wxGetApp().getBookmarkMgr().removeRecent(tvi->bookmarkEnt); - - activateBookmark(tvi->bookmarkEnt); + onRemoveRecent(treeEvent); } else if (tvi->type == TreeViewItem::TREEVIEW_ITEM_TYPE_BOOKMARK) { - activateBookmark(tvi->bookmarkEnt); + onRemoveBookmark(treeEvent); } else if (tvi->type == TreeViewItem::TREEVIEW_ITEM_TYPE_RANGE) { - activateRange(tvi->rangeEnt); + onRemoveRange(treeEvent); + } else if (tvi->type == TreeViewItem::TREEVIEW_ITEM_TYPE_GROUP) { + onRemoveGroup(treeEvent); } + + // TODO: keys for other actions? + } +} + + +void BookmarkView::onTreeActivate( wxTreeEvent& event ) { + + wxTreeItemId itm = event.GetItem(); + TreeViewItem* tvi = dynamic_cast(m_treeView->GetItemData(itm)); + + if (tvi == nullptr) { + event.Skip(); + return; + } + + if (tvi->type == TreeViewItem::TREEVIEW_ITEM_TYPE_ACTIVE) { + if (!tvi->demod->isActive()) { + wxGetApp().setFrequency(tvi->demod->getFrequency()); + nextDemod = tvi->demod; + wxGetApp().getDemodMgr().setActiveDemodulator(nextDemod, false); + } + } else if (tvi->type == TreeViewItem::TREEVIEW_ITEM_TYPE_RECENT) { + + nextEnt = tvi->bookmarkEnt; + wxGetApp().getBookmarkMgr().removeRecent(tvi->bookmarkEnt); + + activateBookmark(tvi->bookmarkEnt); + } else if (tvi->type == TreeViewItem::TREEVIEW_ITEM_TYPE_BOOKMARK) { + activateBookmark(tvi->bookmarkEnt); + } else if (tvi->type == TreeViewItem::TREEVIEW_ITEM_TYPE_RANGE) { + activateRange(tvi->rangeEnt); } } @@ -647,7 +691,19 @@ void BookmarkView::setExpandState(std::string branchName, bool state) { } -void BookmarkView::hideProps() { +void BookmarkView::ensureSelectionInView() { + // Ensure current selection is visible; useful when a layout action + // may have covered the active selection + + auto sel = m_treeView->GetSelection(); + if (sel != nullptr) { + if (!m_treeView->IsVisible(sel)) { + m_treeView->EnsureVisible(sel); + } + } +} + +void BookmarkView::hideProps(bool hidePanel) { m_frequencyLabel->Hide(); m_frequencyVal->Hide(); @@ -660,16 +716,17 @@ void BookmarkView::hideProps() { m_labelText->Hide(); m_labelLabel->Hide(); - m_propPanelDivider->Hide(); - m_propPanel->Hide(); - m_buttonPanel->Hide(); + if (hidePanel) { + m_propPanelDivider->Hide(); + m_propPanel->Hide(); + m_buttonPanel->Hide(); + } } void BookmarkView::showProps() { m_propPanelDivider->Show(); m_propPanel->Show(); - m_propPanel->GetSizer()->Layout(); } @@ -681,13 +738,11 @@ void BookmarkView::clearButtons() { void BookmarkView::showButtons() { m_buttonPanel->Show(); - m_buttonPanel->GetSizer()->Layout(); } void BookmarkView::refreshLayout() { GetSizer()->Layout(); - Update(); - Refresh(); + ensureSelectionInView(); } @@ -810,8 +865,6 @@ void BookmarkView::activeSelection(DemodulatorInstancePtr dsel) { if (dsel == nullptr) { hideProps(); clearButtons(); - showProps(); - showButtons(); refreshLayout(); return; } @@ -821,8 +874,8 @@ void BookmarkView::activeSelection(DemodulatorInstancePtr dsel) { m_modulationVal->SetLabelText(dsel->getDemodulatorType()); m_labelText->SetValue(dsel->getDemodulatorUserLabel()); - hideProps(); - + hideProps(false); + m_frequencyVal->Show(); m_frequencyLabel->Show(); @@ -911,7 +964,7 @@ void BookmarkView::bookmarkSelection(BookmarkEntryPtr bmSel) { m_modulationVal->SetLabelText(bmSel->type); m_labelText->SetValue(bmSel->label); - hideProps(); + hideProps(false); m_frequencyVal->Show(); m_frequencyLabel->Show(); @@ -944,8 +997,8 @@ void BookmarkView::recentSelection(BookmarkEntryPtr bmSel) { m_modulationVal->SetLabelText(bmSel->type); m_labelText->SetValue(bmSel->label); - hideProps(); - + hideProps(false); + m_frequencyVal->Show(); m_frequencyLabel->Show(); @@ -973,8 +1026,8 @@ void BookmarkView::groupSelection(std::string groupName) { clearButtons(); - hideProps(); - + hideProps(false); + m_labelText->SetValue(groupName); m_labelText->Show(); @@ -992,9 +1045,8 @@ void BookmarkView::groupSelection(std::string groupName) { void BookmarkView::rangeSelection(BookmarkRangeEntryPtr re) { clearButtons(); - - hideProps(); - + hideProps(false); + m_labelText->SetValue(re->label); m_labelText->Show(); @@ -1022,7 +1074,7 @@ void BookmarkView::bookmarkBranchSelection() { clearButtons(); hideProps(); - + addButton(m_buttonPanel, BOOKMARK_VIEW_STR_ADD_GROUP, wxCommandEventHandler( BookmarkView::onAddGroup )); showButtons(); @@ -1033,20 +1085,18 @@ void BookmarkView::bookmarkBranchSelection() { void BookmarkView::recentBranchSelection() { clearButtons(); hideProps(); - + addButton(m_buttonPanel, BOOKMARK_VIEW_STR_CLEAR_RECENT, wxCommandEventHandler( BookmarkView::onClearRecents )); showButtons(); refreshLayout(); - - this->Layout(); } void BookmarkView::rangeBranchSelection() { clearButtons(); - hideProps(); - + hideProps(false); + m_labelText->SetValue(wxT("")); m_labelText->Show(); m_labelLabel->Show(); @@ -1057,14 +1107,12 @@ void BookmarkView::rangeBranchSelection() { showButtons(); refreshLayout(); - - this->Layout(); } void BookmarkView::activeBranchSelection() { hideProps(); - this->Layout(); + refreshLayout(); } @@ -1089,7 +1137,7 @@ void BookmarkView::onTreeSelect( wxTreeEvent& event ) { rangeBranchSelection(); } else { hideProps(); - this->Layout(); + refreshLayout(); } return; @@ -1112,7 +1160,7 @@ void BookmarkView::onTreeSelect( wxTreeEvent& event ) { rangeSelection(tvi->rangeEnt); } else { hideProps(); - this->Layout(); + refreshLayout(); } } diff --git a/src/forms/Bookmark/BookmarkView.h b/src/forms/Bookmark/BookmarkView.h index 9bb11212..fd87e331 100644 --- a/src/forms/Bookmark/BookmarkView.h +++ b/src/forms/Bookmark/BookmarkView.h @@ -96,8 +96,9 @@ class BookmarkView : public BookmarkPanel { void recentBranchSelection(); void rangeBranchSelection(); void activeBranchSelection(); - - void hideProps(); + + void ensureSelectionInView(); + void hideProps(bool hidePanel = true); void showProps(); void onUpdateTimer( wxTimerEvent& event ); @@ -105,6 +106,7 @@ class BookmarkView : public BookmarkPanel { //refresh / rebuild the whole tree item immediatly void doUpdateActiveList(); + void onKeyUp( wxKeyEvent& event ); void onTreeActivate( wxTreeEvent& event ); void onTreeCollapse( wxTreeEvent& event ); void onTreeExpanded( wxTreeEvent& event ); diff --git a/src/ui/UITestCanvas.cpp b/src/ui/UITestCanvas.cpp index bce74718..037258ea 100644 --- a/src/ui/UITestCanvas.cpp +++ b/src/ui/UITestCanvas.cpp @@ -38,7 +38,7 @@ UITestCanvas::~UITestCanvas() { } void UITestCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) { - wxPaintDC dc(this); + // wxPaintDC dc(this); const wxSize ClientSize = GetClientSize(); glContext->SetCurrent(*this); diff --git a/src/visual/GainCanvas.cpp b/src/visual/GainCanvas.cpp index 8bebc749..f0477a6a 100644 --- a/src/visual/GainCanvas.cpp +++ b/src/visual/GainCanvas.cpp @@ -51,7 +51,7 @@ GainCanvas::~GainCanvas() { } void GainCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) { - wxPaintDC dc(this); + // wxPaintDC dc(this); const wxSize ClientSize = GetClientSize(); glContext->SetCurrent(*this); diff --git a/src/visual/MeterCanvas.cpp b/src/visual/MeterCanvas.cpp index d18dd782..63d67fce 100644 --- a/src/visual/MeterCanvas.cpp +++ b/src/visual/MeterCanvas.cpp @@ -82,7 +82,7 @@ void MeterCanvas::setShowUserInput(bool showUserInput) { } void MeterCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) { - wxPaintDC dc(this); + // wxPaintDC dc(this); const wxSize ClientSize = GetClientSize(); glContext->SetCurrent(*this); diff --git a/src/visual/ModeSelectorCanvas.cpp b/src/visual/ModeSelectorCanvas.cpp index 56bafae0..16e4ff0a 100644 --- a/src/visual/ModeSelectorCanvas.cpp +++ b/src/visual/ModeSelectorCanvas.cpp @@ -51,7 +51,7 @@ int ModeSelectorCanvas::getHoveredSelection() { } void ModeSelectorCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) { - wxPaintDC dc(this); + // wxPaintDC dc(this); const wxSize ClientSize = GetClientSize(); glContext->SetCurrent(*this); diff --git a/src/visual/ScopeCanvas.cpp b/src/visual/ScopeCanvas.cpp index c7518142..805cc9db 100644 --- a/src/visual/ScopeCanvas.cpp +++ b/src/visual/ScopeCanvas.cpp @@ -101,7 +101,7 @@ bool ScopeCanvas::getShowDb() { } void ScopeCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) { - wxPaintDC dc(this); + // wxPaintDC dc(this); const wxSize ClientSize = GetClientSize(); ScopeRenderDataPtr avData; diff --git a/src/visual/SpectrumCanvas.cpp b/src/visual/SpectrumCanvas.cpp index 5bd03fc8..24274083 100644 --- a/src/visual/SpectrumCanvas.cpp +++ b/src/visual/SpectrumCanvas.cpp @@ -51,7 +51,7 @@ SpectrumCanvas::~SpectrumCanvas() { } void SpectrumCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) { - wxPaintDC dc(this); + // wxPaintDC dc(this); const wxSize ClientSize = GetClientSize(); SpectrumVisualDataPtr vData; diff --git a/src/visual/TuningCanvas.cpp b/src/visual/TuningCanvas.cpp index 1363d95a..1fef0fce 100644 --- a/src/visual/TuningCanvas.cpp +++ b/src/visual/TuningCanvas.cpp @@ -84,7 +84,7 @@ void TuningCanvas::setHalfBand(bool hb) { } void TuningCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) { - wxPaintDC dc(this); + // wxPaintDC dc(this); const wxSize ClientSize = GetClientSize(); glContext->SetCurrent(*this); diff --git a/src/visual/WaterfallCanvas.cpp b/src/visual/WaterfallCanvas.cpp index d6edd07a..a77ecb0e 100644 --- a/src/visual/WaterfallCanvas.cpp +++ b/src/visual/WaterfallCanvas.cpp @@ -128,7 +128,7 @@ void WaterfallCanvas::processInputQueue() { void WaterfallCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) { std::lock_guard < std::mutex > lock(tex_update); - wxPaintDC dc(this); +// wxPaintDC dc(this); const wxSize ClientSize = GetClientSize(); long double currentZoom = zoom;