Skip to content

Commit

Permalink
Fixed:
Browse files Browse the repository at this point in the history
When using table commands in patterns (eg. 08 to set wavetable index), the index is automatically updated if you insert or delete entries in the table.
However, undo would not update the indexes, leaving them at their last value.
  • Loading branch information
jpage8580 committed Jun 22, 2023
1 parent 2712447 commit 45b8e3a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/gtable.c
Original file line number Diff line number Diff line change
Expand Up @@ -503,10 +503,22 @@ void tablecommands(GTOBJECT *gt)
break;

case KEY_DEL:
// Could be that the table pointers in the patterns are modified when inserting/deleting rows in tables
// Need to track these for undo
for (int i = 0;i < MAX_PATT;i++)
{
undoAreaSetCheckForChange(UNDO_AREA_PATTERN, i, UNDO_AREA_DIRTY_CHECK);
}
deletetable(editorInfo.etnum, editorInfo.etpos);
break;

case KEY_INS:
// Could be that the table pointers in the patterns are modified when inserting/deleting rows in tables
// Need to track these for undo
for (int i = 0;i < MAX_PATT;i++)
{
undoAreaSetCheckForChange(UNDO_AREA_PATTERN, i, UNDO_AREA_DIRTY_CHECK);
}
inserttable(editorInfo.etnum, editorInfo.etpos, shiftOrCtrlPressed);
break;

Expand Down
Binary file modified win32/gtultra.exe
Binary file not shown.

0 comments on commit 45b8e3a

Please sign in to comment.