Skip to content

Commit 8f420ea

Browse files
committed
default extension location fixed
1 parent 7f16b38 commit 8f420ea

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

lib/src/view/design_main_strand.dart

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -644,14 +644,14 @@ after:
644644
].build()),
645645
ContextMenuItem(
646646
title: 'add extension',
647-
on_click: () => app.disable_keyboard_shortcuts_while(() => ask_for_add_extension(strand)),
647+
on_click: () => app.disable_keyboard_shortcuts_while(() => ask_for_add_extension(strand, type)),
648648
disabled: strand.has_5p_extension && strand.has_3p_extension),
649649
];
650650

651651
return items;
652652
}
653653

654-
Future<void> ask_for_add_extension(Strand strand) async {
654+
Future<void> ask_for_add_extension(Strand strand, ModificationType type) async {
655655
if (strand.has_5p_extension && strand.has_3p_extension) {
656656
// This shouldn't be reachable since the context menu should not include the
657657
// add extension option in this case, but let's check just in case.
@@ -669,6 +669,9 @@ after:
669669
assert(options.isNotEmpty);
670670

671671
int selected_radio_index = 0;
672+
if ((type == ModificationType.three_prime) && (options.length > 1)) {
673+
selected_radio_index = 1;
674+
}
672675
int extension_end_idx = 0;
673676
int num_bases_idx = 1;
674677
var items = util.FixedList<DialogItem>(2);

0 commit comments

Comments
 (0)