Commit 5fef6528 authored by ROOL's avatar ROOL 🤖
Browse files

Add duplicate selection operation

Detail:
  Define Ctrl-D to duplicate (equivalent to copy/paste with nudge), and reassign the previous use of Ctrl-D to reset the zoom ratio to 1:1 to Ctrl-0.
Admin:
  Submission for Clipboard Support bounty.

Version 1.37. Tagged as 'Draw-1_37'
parent a0322e74
No preview for this file type
......@@ -9,12 +9,12 @@
GBLS Module_ApplicationDate
GBLS Module_HelpVersion
GBLS Module_ComponentName
Module_MajorVersion SETS "1.36"
Module_Version SETA 136
Module_MajorVersion SETS "1.37"
Module_Version SETA 137
Module_MinorVersion SETS ""
Module_Date SETS "08 Jun 2019"
Module_ApplicationDate SETS "08-Jun-19"
Module_Date SETS "09 Nov 2019"
Module_ApplicationDate SETS "09-Nov-19"
Module_ComponentName SETS "Draw"
Module_FullVersion SETS "1.36"
Module_HelpVersion SETS "1.36 (08 Jun 2019)"
Module_FullVersion SETS "1.37"
Module_HelpVersion SETS "1.37 (09 Nov 2019)"
END
/* (1.36)
/* (1.37)
*
* This file is automatically maintained by srccommit, do not edit manually.
*
*/
#define Module_MajorVersion_CMHG 1.36
#define Module_MajorVersion_CMHG 1.37
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 08 Jun 2019
#define Module_Date_CMHG 09 Nov 2019
#define Module_MajorVersion "1.36"
#define Module_Version 136
#define Module_MajorVersion "1.37"
#define Module_Version 137
#define Module_MinorVersion ""
#define Module_Date "08 Jun 2019"
#define Module_Date "09 Nov 2019"
#define Module_ApplicationDate "08-Jun-19"
#define Module_ApplicationDate "09-Nov-19"
#define Module_ComponentName "Draw"
#define Module_FullVersion "1.36"
#define Module_HelpVersion "1.36 (08 Jun 2019)"
#define Module_LibraryVersionInfo "1:36"
#define Module_FullVersion "1.37"
#define Module_HelpVersion "1.37 (09 Nov 2019)"
#define Module_LibraryVersionInfo "1:37"
......@@ -1136,6 +1136,7 @@ static BOOL select_check (int which, int code, diagrec *diag, viewrec *vuue)
return owner && draw_selection->indx > 0;
case s_Select_Cut:
case s_Select_Copy:
case s_Select_Duplicate:
return draw_selection->indx > 0;
case s_Select_Paste:
return draw_clipboard_check_paste();
......@@ -1213,6 +1214,14 @@ static void do_select (int which, int code, char *hit, diagrec *diag,
draw_select_clearall (sel);
break;
case s_Select_Duplicate:
{ trans_str jog;
draw_grid_jog (vuue, &jog);
err = draw_select_copy (sel, diag, &jog, FALSE);
}
break;
case s_Select_Cut:
draw_file_copy_selection(diag);
err = draw_select_delete(sel);
......@@ -3042,8 +3051,12 @@ void draw_menu_processkeys (diagrec *diag, viewrec *vuue, int key)
do_select (1, s_Select_Edit, NULL, diag, vuue);
break;
case akbd_Fn + 7:
case 4 /* ^D - duplicate */:
do_select (1, s_Select_Duplicate, NULL, diag, vuue);
break;
case 3 /* ^C or F7 */: /* Copy selection or Add point */
case akbd_Fn + 7:
if (edit) do_edit (s_Edit_Add, diag, vuue);
else do_select (1, s_Select_Copy, NULL, diag, vuue);
break;
......@@ -3130,7 +3143,7 @@ void draw_menu_processkeys (diagrec *diag, viewrec *vuue, int key)
do_select (1, s_Select_All, NULL, diag, vuue);
break;
case 4 /*control-D*/: /* Zoom 1:1 */
case 0 /*control-0 or control-@*/: /* Zoom 1:1 */
draw_action_zoom_alter (vuue, 0);
break;
......
......@@ -84,23 +84,24 @@
#define s_Enter_Abandon 9
/* Select menus */
#define s_Select_Select 0
#define s_Select_All 1
#define s_Select_Clear 2
#define s_Select_Cut 3
#define s_Select_Copy 4
#define s_Select_Paste 5
#define s_Select_Delete 6
#define s_Select_Front 7
#define s_Select_Back 8
#define s_Select_Group 9
#define s_Select_Ungroup 10
#define s_Select_Edit 11
#define s_Select_Snap 12
#define s_Select_Justify 13
#define s_Select_Interp 14
#define s_Select_Grade 15
#define s_Select_To_Path 16
#define s_Select_Select 0
#define s_Select_All 1
#define s_Select_Clear 2
#define s_Select_Duplicate 3
#define s_Select_Cut 4
#define s_Select_Copy 5
#define s_Select_Paste 6
#define s_Select_Delete 7
#define s_Select_Front 8
#define s_Select_Back 9
#define s_Select_Group 10
#define s_Select_Ungroup 11
#define s_Select_Edit 12
#define s_Select_Snap 13
#define s_Select_Justify 14
#define s_Select_Interp 15
#define s_Select_Grade 16
#define s_Select_To_Path 17
#define s_Transform_Transform 0
#define s_Transform_Rotate 1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment