Skip to content

Commit b147ea0

Browse files
committed
Merge pull request #506 from Karajorma/BUGFIX-RepeatCounts
Fix the issue with repeat counts first discovered on this thread http…
2 parents 24b58db + 8a2eec5 commit b147ea0

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

code/fred2/eventeditor.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,10 @@ void event_editor::OnButtonNewEvent()
672672
return;
673673
}
674674

675+
// before we do anything, we must check and save off any data from the current event (e.g
676+
// the repeat count and interval count)
677+
save();
678+
675679
reset_event(m_num_events++, TVI_LAST);
676680
}
677681

@@ -685,6 +689,11 @@ void event_editor::OnInsert()
685689
return;
686690
}
687691

692+
// before we do anything, we must check and save off any data from the current event (e.g
693+
// the repeat count and interval count)
694+
save();
695+
696+
688697
if(cur_event < 0 || m_num_events == 0)
689698
{
690699
//There are no events yet, so just create one
@@ -750,6 +759,8 @@ void event_editor::reset_event(int num, HTREEITEM after)
750759
m_event_tree.item_index = index;
751760
m_event_tree.add_operator("do-nothing");
752761

762+
update_cur_event();
763+
753764
m_event_tree.SelectItem(h);
754765
// GetDlgItem(IDC_CHAIN_DELAY) -> EnableWindow(FALSE);
755766
if (num >= MAX_MISSION_EVENTS){

0 commit comments

Comments
 (0)