Skip to content

Commit 3311704

Browse files
committed
Provide a limited partial fix for FRED keyboard shortcuts
1 parent 0f168ec commit 3311704

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

fred2/fred.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ IDR_MENU_EDIT_SEXP_TREE MENU
445445
BEGIN
446446
POPUP "Edit sexp tree"
447447
BEGIN
448-
MENUITEM "&Delete Item\tDelete", ID_DELETE
448+
MENUITEM "&Delete Item", ID_DELETE
449449
MENUITEM "&Edit Data\tSpace Bar", ID_EDIT_TEXT
450450
MENUITEM "Expand All", ID_EXPAND_ALL
451451
MENUITEM SEPARATOR

fred2/sexp_tree.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2509,13 +2509,13 @@ void sexp_tree::NodeCopy()
25092509

25102510
void sexp_tree::NodeReplacePaste()
25112511
{
2512-
if (item_index < 0)
2512+
if (item_index < 0 || Sexp_clipboard < 0)
25132513
return;
25142514

25152515
int i;
25162516

25172517
// the following assumptions are made..
2518-
Assert((Sexp_clipboard > -1) && (Sexp_nodes[Sexp_clipboard].type != SEXP_NOT_USED));
2518+
Assert(Sexp_nodes[Sexp_clipboard].type != SEXP_NOT_USED);
25192519
Assert(Sexp_nodes[Sexp_clipboard].subtype != SEXP_ATOM_LIST);
25202520
Assertion(Sexp_nodes[Sexp_clipboard].subtype != SEXP_ATOM_CONTAINER_NAME,
25212521
"Attempt to use container name %s from SEXP clipboard. Please report!",
@@ -2587,13 +2587,13 @@ void sexp_tree::NodeReplacePaste()
25872587

25882588
void sexp_tree::NodeAddPaste()
25892589
{
2590-
if (item_index < 0)
2590+
if (item_index < 0 || Sexp_clipboard < 0)
25912591
return;
25922592

25932593
int i;
25942594

25952595
// the following assumptions are made..
2596-
Assert((Sexp_clipboard > -1) && (Sexp_nodes[Sexp_clipboard].type != SEXP_NOT_USED));
2596+
Assert(Sexp_nodes[Sexp_clipboard].type != SEXP_NOT_USED);
25972597
Assert(Sexp_nodes[Sexp_clipboard].subtype != SEXP_ATOM_LIST);
25982598
Assertion(Sexp_nodes[Sexp_clipboard].subtype != SEXP_ATOM_CONTAINER_NAME,
25992599
"Attempt to use container name %s from SEXP clipboard. Please report!",

0 commit comments

Comments
 (0)