From 2fb1989ce79a6d9bf25edd017b0c3ad631e5f0a5 Mon Sep 17 00:00:00 2001 From: yumisims Date: Mon, 30 Mar 2026 14:47:32 +0100 Subject: [PATCH 1/2] fixed gridlines issue --- PretextView.cpp | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/PretextView.cpp b/PretextView.cpp index 88d0258..588a5f2 100644 --- a/PretextView.cpp +++ b/PretextView.cpp @@ -1951,7 +1951,7 @@ MetaTagsEditorRun(struct nk_context *ctx, u08 show) { if (!strlen((const char *)Meta_Data->tags[index])) { - ForLoop2(Number_of_Pixels_1D) Map_State->metaDataFlags[index2] &= ~(1 << index); + ForLoop2(Number_of_Pixels_1D) Map_State->metaDataFlags[index2] &= ~(1ULL << index); u32 nextActive = index; ForLoop2((ArrayCount(Meta_Data->tags) - 1)) { @@ -5973,7 +5973,9 @@ Render() { (char *)"Left Click: pickup, place", (char *)"S: toggle snap mode", (char *)"Middle Click / Spacebar: pickup whole sequence or (hold Shift): scaffold", - (char *)"Middle Click / Spacebar (while editing): invert sequence" + (char *)"Middle Click / Spacebar (while editing): invert sequence", + (char *)"P: copy highlight to clipboard", + (char *)"V: break at selection start, Shift+V: break at end" }; textBoxHeight = (f32)helpTexts.size() * (lh + 1.0f) - 1.0f; @@ -9874,21 +9876,13 @@ KeyBoard(GLFWwindow* window, s32 key, s32 scancode, s32 action, s32 mods) case GLFW_KEY_V: if (Edit_Mode && action != GLFW_RELEASE) { + // One breakpoint per keypress: V = at start of selection (min pixel), Shift+V = at end (max). yy5 u32 start = my_Min(Edit_Pixels.pixels.x, Edit_Pixels.pixels.y); u32 end = my_Max(Edit_Pixels.pixels.x, Edit_Pixels.pixels.y); - u32 didBreak = 0; - if (BreakMap((int)start, 1)) - { - AddBreakEdit(start); - didBreak = 1; - } - if (end != start && BreakMap((int)end, 1)) - { - AddBreakEdit(end); - didBreak = 1; - } - if (didBreak) + u32 loc = (mods & GLFW_MOD_SHIFT) ? end : start; + if (BreakMap((int)loc, 1)) { + AddBreakEdit(loc); UpdateContigsFromMapState(); UpdateScaffolds(); Redisplay = 1; From b02ac2370113eeb240a396b12838447e06a77baa Mon Sep 17 00:00:00 2001 From: yumisims Date: Mon, 30 Mar 2026 15:24:19 +0100 Subject: [PATCH 2/2] changed readme --- PretextView.cpp | 7 +++---- README.md | 3 +-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/PretextView.cpp b/PretextView.cpp index 588a5f2..83d90f3 100644 --- a/PretextView.cpp +++ b/PretextView.cpp @@ -5975,7 +5975,7 @@ Render() { (char *)"Middle Click / Spacebar: pickup whole sequence or (hold Shift): scaffold", (char *)"Middle Click / Spacebar (while editing): invert sequence", (char *)"P: copy highlight to clipboard", - (char *)"V: break at selection start, Shift+V: break at end" + (char *)"V: break at selection start" }; textBoxHeight = (f32)helpTexts.size() * (lh + 1.0f) - 1.0f; @@ -9876,10 +9876,9 @@ KeyBoard(GLFWwindow* window, s32 key, s32 scancode, s32 action, s32 mods) case GLFW_KEY_V: if (Edit_Mode && action != GLFW_RELEASE) { - // One breakpoint per keypress: V = at start of selection (min pixel), Shift+V = at end (max). yy5 + // One breakpoint per keypress: V at start of selection (min pixel). u32 start = my_Min(Edit_Pixels.pixels.x, Edit_Pixels.pixels.y); - u32 end = my_Max(Edit_Pixels.pixels.x, Edit_Pixels.pixels.y); - u32 loc = (mods & GLFW_MOD_SHIFT) ? end : start; + u32 loc = start; if (BreakMap((int)loc, 1)) { AddBreakEdit(loc); diff --git a/README.md b/README.md index 441a721..0b3e201 100644 --- a/README.md +++ b/README.md @@ -39,9 +39,8 @@ PretextView is a desktop application for viewing pretext contact maps.
## Edit mode (`E`) - `left mouse button`: Click and drag with the left mouse button to select an are to zoom to. - Pickup a region of a contig with the left mouse button, pickup a whole contig with the middle mouse button or spacebar. Place a region with the left mouse button. Invert a selected region with the middle mouse button or spacebar. Undo the last edit with the 'q' key. Exit edit mode with the 'e' key. Use the GUI to see a list of completed edits. -- `P`: copy the **highlighted** map range to the system clipboard. The text lists each map fragment in the selection with the contig name and a **local** span in megabases along that fragment (not a single genome-wide coordinate). If nothing is actively selected, the current edit cursor range is used. +- `P`: copy the **highlighted** map range to the system clipboard. The text lists each map fragment in the selection with the contig name and a **local** span in megabases along that fragment (not a single genome-wide coordinate). - `V`: break (split) the contig at the start of the current selection. -- `Shift` + `V`: break (split) the contig at the end of the current selection. ## Waypoint mode (`W`) - `left mouse button`: place a waypoint.