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.
This commit is contained in:
@@ -20,6 +20,9 @@ project(ObsidianDragon
|
|||||||
DESCRIPTION "DragonX Cryptocurrency Wallet"
|
DESCRIPTION "DragonX Cryptocurrency Wallet"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Pre-release suffix (e.g. "-rc1", "-beta2"). Leave empty for stable releases.
|
||||||
|
set(DRAGONX_VERSION_SUFFIX "-rc1")
|
||||||
|
|
||||||
# C++17 standard
|
# C++17 standard
|
||||||
set(CMAKE_CXX_STANDARD 17)
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|||||||
2
build.sh
2
build.sh
@@ -20,7 +20,7 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
VERSION="1.2.0"
|
VERSION="1.2.0-rc1"
|
||||||
|
|
||||||
# ── Colours ──────────────────────────────────────────────────────────────────
|
# ── Colours ──────────────────────────────────────────────────────────────────
|
||||||
RED='\033[0;31m'
|
RED='\033[0;31m'
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
// !! DO NOT EDIT version.h — it is generated from version.h.in by CMake.
|
// !! 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 ...)
|
// !! 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_MAJOR 1
|
||||||
#define DRAGONX_VERSION_MINOR 2
|
#define DRAGONX_VERSION_MINOR 2
|
||||||
#define DRAGONX_VERSION_PATCH 0
|
#define DRAGONX_VERSION_PATCH 0
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
// !! DO NOT EDIT version.h — it is generated from version.h.in by CMake.
|
// !! 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 ...)
|
// !! 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_MAJOR @PROJECT_VERSION_MAJOR@
|
||||||
#define DRAGONX_VERSION_MINOR @PROJECT_VERSION_MINOR@
|
#define DRAGONX_VERSION_MINOR @PROJECT_VERSION_MINOR@
|
||||||
#define DRAGONX_VERSION_PATCH @PROJECT_VERSION_PATCH@
|
#define DRAGONX_VERSION_PATCH @PROJECT_VERSION_PATCH@
|
||||||
|
|||||||
@@ -1557,8 +1557,9 @@ static void RenderSharedAddressList(App* app, float listH, float availW,
|
|||||||
bool mouseDown = ImGui::IsMouseDown(ImGuiMouseButton_Left);
|
bool mouseDown = ImGui::IsMouseDown(ImGuiMouseButton_Left);
|
||||||
bool mouseClicked = ImGui::IsMouseClicked(ImGuiMouseButton_Left);
|
bool mouseClicked = ImGui::IsMouseClicked(ImGuiMouseButton_Left);
|
||||||
|
|
||||||
// Reset drop target each frame — it gets set only if mouse is over a row
|
// Reset drop target each frame — it gets set only if mouse is over a row.
|
||||||
if (s_dragActive) s_dropTargetIdx = -1;
|
// 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) {
|
if (s_dragIdx >= 0 && !mouseDown) {
|
||||||
// Mouse released — copy if it was a click (no drag activated)
|
// Mouse released — copy if it was a click (no drag activated)
|
||||||
|
|||||||
Reference in New Issue
Block a user