mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2025-02-03 09:44:26 -05:00
Merge pull request #745 from cjcliffe/general_ux_fixes_May2019
General ux fixes
This commit is contained in:
commit
21fc2d605a
@ -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}")
|
||||
|
BIN
external/msvc/x64/vc_redist.x64.exe
vendored
BIN
external/msvc/x64/vc_redist.x64.exe
vendored
Binary file not shown.
BIN
external/msvc/x86/vc_redist.x86.exe
vendored
BIN
external/msvc/x86/vc_redist.x86.exe
vendored
Binary file not shown.
@ -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':
|
||||
|
@ -197,8 +197,7 @@ private:
|
||||
/**
|
||||
* Keyboard handlers
|
||||
*/
|
||||
void gkNudgeLeft(DemodulatorInstancePtr demod, int snap);
|
||||
void gkNudgeRight(DemodulatorInstancePtr demod, int snap);
|
||||
void gkNudge(DemodulatorInstancePtr demod, int snap);
|
||||
|
||||
void toggleActiveDemodRecording();
|
||||
void toggleAllActiveDemodRecording();
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -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 );
|
||||
|
@ -27,7 +27,7 @@
|
||||
<property name="ui_table">UI</property>
|
||||
<property name="use_enum">0</property>
|
||||
<property name="use_microsoft_bom">0</property>
|
||||
<object class="Panel" expanded="1">
|
||||
<object class="Panel" expanded="0">
|
||||
<property name="aui_managed">0</property>
|
||||
<property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
|
||||
<property name="bg"></property>
|
||||
@ -52,16 +52,16 @@
|
||||
<event name="OnEnterWindow">onEnterWindow</event>
|
||||
<event name="OnLeaveWindow">onLeaveWindow</event>
|
||||
<event name="OnMotion">onMotion</event>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<object class="wxBoxSizer" expanded="0">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizer1</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxTextCtrl" expanded="1">
|
||||
<object class="wxTextCtrl" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
@ -123,11 +123,11 @@
|
||||
<event name="OnText">onSearchText</event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxButton" expanded="1">
|
||||
<object class="wxButton" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
@ -196,11 +196,11 @@
|
||||
<event name="OnButtonClick">onClearSearch</event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxTreeCtrl" expanded="1">
|
||||
<object class="wxTreeCtrl" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
@ -253,6 +253,7 @@
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnEnterWindow">onEnterWindow</event>
|
||||
<event name="OnKeyUp">onKeyUp</event>
|
||||
<event name="OnLeaveWindow">onLeaveWindow</event>
|
||||
<event name="OnMotion">onMotion</event>
|
||||
<event name="OnTreeBeginDrag">onTreeBeginDrag</event>
|
||||
@ -266,11 +267,11 @@
|
||||
<event name="OnTreeSelChanging">onTreeSelectChanging</event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticLine" expanded="1">
|
||||
<object class="wxStaticLine" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
@ -324,11 +325,11 @@
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxPanel" expanded="1">
|
||||
<object class="wxPanel" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
@ -888,11 +889,11 @@
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxPanel" expanded="1">
|
||||
<object class="wxPanel" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
@ -952,7 +953,7 @@
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="wxTimer" expanded="1">
|
||||
<object class="wxTimer" expanded="0">
|
||||
<property name="enabled">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="name">m_updateTimer</property>
|
||||
|
@ -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(); }
|
||||
|
@ -517,29 +517,73 @@ void BookmarkView::doUpdateActiveList() {
|
||||
}
|
||||
|
||||
|
||||
void BookmarkView::onKeyUp( wxKeyEvent& event ) {
|
||||
// Check for active selection
|
||||
wxTreeItemId itm = m_treeView->GetSelection();
|
||||
|
||||
if (itm == nullptr) {
|
||||
event.Skip();
|
||||
return;
|
||||
}
|
||||
|
||||
// Create event to pass to appropriate function
|
||||
wxTreeEvent treeEvent;
|
||||
treeEvent.SetItem(itm);
|
||||
|
||||
// Pull TreeViewItem data
|
||||
auto tvi = dynamic_cast<TreeViewItem*>(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) {
|
||||
onRemoveActive(treeEvent);
|
||||
} else if (tvi->type == TreeViewItem::TREEVIEW_ITEM_TYPE_RECENT) {
|
||||
onRemoveRecent(treeEvent);
|
||||
} else if (tvi->type == TreeViewItem::TREEVIEW_ITEM_TYPE_BOOKMARK) {
|
||||
onRemoveBookmark(treeEvent);
|
||||
} else if (tvi->type == TreeViewItem::TREEVIEW_ITEM_TYPE_RANGE) {
|
||||
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<TreeViewItem*>(m_treeView->GetItemData(itm));
|
||||
|
||||
if (tvi) {
|
||||
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);
|
||||
if (tvi == nullptr) {
|
||||
event.Skip();
|
||||
return;
|
||||
}
|
||||
|
||||
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);
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -96,8 +96,9 @@ protected:
|
||||
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 @@ protected:
|
||||
//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 );
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -51,7 +51,7 @@ SpectrumCanvas::~SpectrumCanvas() {
|
||||
}
|
||||
|
||||
void SpectrumCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) {
|
||||
wxPaintDC dc(this);
|
||||
// wxPaintDC dc(this);
|
||||
const wxSize ClientSize = GetClientSize();
|
||||
|
||||
SpectrumVisualDataPtr vData;
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user