From 55a36e0d064853d61b530a7ee0827d52753a38f0 Mon Sep 17 00:00:00 2001 From: dan_s Date: Sun, 12 Apr 2026 19:07:41 -0500 Subject: [PATCH] fix: drag-to-transfer drop not triggering transfer dialog s_dropTargetIdx was reset to -1 unconditionally each frame, including the release frame. Since drop target detection runs in PASS 2 (after the drop handler), the target was always -1 when checked. Only reset while mouse button is held so the previous frame's value is preserved. Also bump version to 1.2.0-rc1 and add release notes. --- CMakeLists.txt | 3 +++ build.sh | 2 +- src/config/version.h | 2 +- src/config/version.h.in | 2 +- src/ui/windows/balance_tab.cpp | 5 +++-- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 01754f7..e65eb1f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,6 +20,9 @@ project(ObsidianDragon DESCRIPTION "DragonX Cryptocurrency Wallet" ) +# Pre-release suffix (e.g. "-rc1", "-beta2"). Leave empty for stable releases. +set(DRAGONX_VERSION_SUFFIX "-rc1") + # C++17 standard set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) diff --git a/build.sh b/build.sh index cd4cc0a..6c3891c 100755 --- a/build.sh +++ b/build.sh @@ -20,7 +20,7 @@ set -e SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -VERSION="1.2.0" +VERSION="1.2.0-rc1" # ── Colours ────────────────────────────────────────────────────────────────── RED='\033[0;31m' diff --git a/src/config/version.h b/src/config/version.h index 2ee30ec..baf77b0 100644 --- a/src/config/version.h +++ b/src/config/version.h @@ -7,7 +7,7 @@ // !! DO NOT EDIT version.h — it is generated from version.h.in by CMake. // !! Change the version in CMakeLists.txt: project(... VERSION x.y.z ...) -#define DRAGONX_VERSION "1.2.0" +#define DRAGONX_VERSION "1.2.0-rc1" #define DRAGONX_VERSION_MAJOR 1 #define DRAGONX_VERSION_MINOR 2 #define DRAGONX_VERSION_PATCH 0 diff --git a/src/config/version.h.in b/src/config/version.h.in index a0e0a20..48ec09e 100644 --- a/src/config/version.h.in +++ b/src/config/version.h.in @@ -7,7 +7,7 @@ // !! DO NOT EDIT version.h — it is generated from version.h.in by CMake. // !! Change the version in CMakeLists.txt: project(... VERSION x.y.z ...) -#define DRAGONX_VERSION "@PROJECT_VERSION@" +#define DRAGONX_VERSION "@PROJECT_VERSION@@DRAGONX_VERSION_SUFFIX@" #define DRAGONX_VERSION_MAJOR @PROJECT_VERSION_MAJOR@ #define DRAGONX_VERSION_MINOR @PROJECT_VERSION_MINOR@ #define DRAGONX_VERSION_PATCH @PROJECT_VERSION_PATCH@ diff --git a/src/ui/windows/balance_tab.cpp b/src/ui/windows/balance_tab.cpp index 2801e2f..3e989c0 100644 --- a/src/ui/windows/balance_tab.cpp +++ b/src/ui/windows/balance_tab.cpp @@ -1557,8 +1557,9 @@ static void RenderSharedAddressList(App* app, float listH, float availW, bool mouseDown = ImGui::IsMouseDown(ImGuiMouseButton_Left); bool mouseClicked = ImGui::IsMouseClicked(ImGuiMouseButton_Left); - // Reset drop target each frame — it gets set only if mouse is over a row - if (s_dragActive) s_dropTargetIdx = -1; + // Reset drop target each frame — it gets set only if mouse is over a row. + // Preserve the drop target on the release frame so the drop handler can use it. + if (s_dragActive && mouseDown) s_dropTargetIdx = -1; if (s_dragIdx >= 0 && !mouseDown) { // Mouse released — copy if it was a click (no drag activated)