diff --git a/PretextView.cpp b/PretextView.cpp index 88d0258..83d90f3 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" }; textBoxHeight = (f32)helpTexts.size() * (lh + 1.0f) - 1.0f; @@ -9874,21 +9876,12 @@ 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). 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 = start; + if (BreakMap((int)loc, 1)) { + AddBreakEdit(loc); UpdateContigsFromMapState(); UpdateScaffolds(); Redisplay = 1; 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.