mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2026-06-02 06:04:39 -04:00
LABEL: Add a label edit dialog, much like FrequencyDialog, works not bad
This commit is contained in:
@@ -381,14 +381,14 @@ void PrimaryGLContext::DrawDemod(DemodulatorInstance *demod, RGBA4f color, long
|
||||
|
||||
//demodulator user label if present: type is displayed above the label, which is at the bottom of the screen.
|
||||
if (!demod->getDemodulatorUserLabel().empty()) {
|
||||
hPos += 2 * labelHeight;
|
||||
hPos += 1.3 * labelHeight;
|
||||
}
|
||||
|
||||
drawSingleDemodLabel(demodStr, uxPos, hPos, xOfs, yOfs, GLFont::GLFONT_ALIGN_CENTER);
|
||||
|
||||
//revert...
|
||||
if (!demod->getDemodulatorUserLabel().empty()) {
|
||||
hPos -= 2 * labelHeight;
|
||||
hPos -= 1.3 * labelHeight;
|
||||
drawSingleDemodLabel(demod->getDemodulatorUserLabel(), uxPos, hPos, xOfs, yOfs, GLFont::GLFONT_ALIGN_CENTER);
|
||||
}
|
||||
|
||||
|
||||
@@ -430,7 +430,7 @@ void TuningCanvas::OnKeyDown(wxKeyEvent& event) {
|
||||
} else if (hoverState == TUNING_HOVER_BW) {
|
||||
wxGetApp().showFrequencyInput(FrequencyDialog::FDIALOG_TARGET_BANDWIDTH);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void TuningCanvas::OnKeyUp(wxKeyEvent& event) {
|
||||
|
||||
@@ -451,6 +451,9 @@ void WaterfallCanvas::OnKeyDown(wxKeyEvent& event) {
|
||||
case WXK_SPACE:
|
||||
wxGetApp().showFrequencyInput();
|
||||
break;
|
||||
case 'E': //E is for 'Edit the label' of the active demodulator.
|
||||
wxGetApp().showLabelInput();
|
||||
break;
|
||||
case 'C':
|
||||
if (wxGetApp().getDemodMgr().getActiveDemodulator()) {
|
||||
wxGetApp().setFrequency(wxGetApp().getDemodMgr().getActiveDemodulator()->getFrequency());
|
||||
@@ -568,14 +571,14 @@ void WaterfallCanvas::updateHoverState() {
|
||||
|
||||
mouseTracker.setVertDragLock(true);
|
||||
mouseTracker.setHorizDragLock(false);
|
||||
setStatusText("Click and drag to change demodulator bandwidth. SPACE or numeric key for direct frequency input. [, ] to nudge, M for mute, D to delete, C to center.");
|
||||
setStatusText("Click and drag to change demodulator bandwidth. SPACE or numeric key for direct frequency input. [, ] to nudge, M for mute, D to delete, C to center, E to edit label.");
|
||||
} else {
|
||||
SetCursor(wxCURSOR_SIZING);
|
||||
nextDragState = WF_DRAG_FREQUENCY;
|
||||
|
||||
mouseTracker.setVertDragLock(true);
|
||||
mouseTracker.setHorizDragLock(false);
|
||||
setStatusText("Click and drag to change demodulator frequency; SPACE or numeric key for direct input. [, ] to nudge, M for mute, D to delete, C to center.");
|
||||
setStatusText("Click and drag to change demodulator frequency; SPACE or numeric key for direct input. [, ] to nudge, M for mute, D to delete, C to center, E to edit label.");
|
||||
}
|
||||
} else {
|
||||
SetCursor(wxCURSOR_CROSS);
|
||||
|
||||
Reference in New Issue
Block a user