Fixed wonky center tuning behavior

This commit is contained in:
AlexandreRouma
2021-09-13 20:07:40 +02:00
parent 2184e15e44
commit 9d34c6a8c1
3 changed files with 7 additions and 1 deletions

View File

@ -418,7 +418,7 @@ namespace ImGui {
}
// Finally, if nothing else was selected, just move the VFO
if (ImGui::IsMouseDown(ImGuiMouseButton_Left) && (mouseInFFT|mouseInWaterfall) && (mouseMoved || hoveredVFOName == "")) {
if ((VFOMoveSingleClick ? ImGui::IsMouseClicked(ImGuiMouseButton_Left) : ImGui::IsMouseDown(ImGuiMouseButton_Left)) && (mouseInFFT|mouseInWaterfall) && (mouseMoved || hoveredVFOName == "")) {
if (selVfo != NULL) {
int refCenter = mousePos.x - (widgetPos.x + 50);
if (refCenter >= 0 && refCenter < dataWidth) {

View File

@ -175,6 +175,7 @@ namespace ImGui {
};
bool inputHandled = false;
bool VFOMoveSingleClick = false;
Event<InputHandlerArgs> onInputProcess;
enum {