Skip to content

Commit f1e9bda

Browse files
author
Ian D
committed
(aris_proof_remove_sentence): Correctly accounts for the removal of fin_prem.
1 parent ff7af25 commit f1e9bda

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

ChangeLog

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
2014-03-06 Ian Dunn <[email protected]>
22

3+
* aris-proof.c (aris_proof_remove_sentence): Correctly
4+
accounts for the removal of fin_prem.
5+
36
* sentence.c (select_reference): Doesn't allow subproofs to
47
select references.
58

src/aris-proof.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ aris_proof_init_from_proof (proof_t * proof)
277277
gtk_grid_attach_next_to (GTK_GRID (SEN_PARENT (ap)->container),
278278
SEN_PARENT (ap)->separator, NULL, GTK_POS_BOTTOM,
279279
1, 1);
280+
280281
first = 0;
281282
}
282283
else
@@ -764,11 +765,13 @@ aris_proof_remove_sentence (aris_proof * ap, sentence * sen)
764765
if (sentence_get_line_no (sen) == 1)
765766
return 1;
766767

768+
int have_fin_prem = (ap->fin_prem->value == sen) ? 1 : 0;
769+
767770
item_t * target = sen_parent_rem_sentence ((sen_parent *) ap, sen);
768771
if (!target)
769772
return AEC_MEM;
770773

771-
if (ap->fin_prem == target)
774+
if (have_fin_prem)
772775
ap->fin_prem = SEN_PARENT (ap)->focused;
773776

774777
int ret = aris_proof_adjust_lines (ap, target, -1);

0 commit comments

Comments
 (0)