undo can clear dirty state
This commit is contained in:
parent
c194053b83
commit
e040b1a29b
|
@ -368,6 +368,9 @@ edit_change_current_history_state(Thread_Context *tctx, Models *models, Editing_
|
|||
}
|
||||
|
||||
file->state.current_record_index = current;
|
||||
if (file->state.saved_record_index == current){
|
||||
RemFlag(file->state.dirty, DirtyState_UnsavedChanges);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -155,6 +155,7 @@ save_file_to_name(Thread_Context *tctx, Models *models, Editing_File *file, u8 *
|
|||
File_Attributes new_attributes = system_save_file(scratch, (char*)file_name, saveable_string);
|
||||
if (new_attributes.last_write_time > 0 &&
|
||||
using_actual_file_name){
|
||||
file->state.saved_record_index = file->state.current_record_index;
|
||||
file->state.save_state = FileSaveState_SavedWaitingForNotification;
|
||||
file_clear_dirty_flags(file);
|
||||
}
|
||||
|
|
|
@ -47,6 +47,8 @@ struct Editing_File_State{
|
|||
History history;
|
||||
i32 current_record_index;
|
||||
|
||||
i32 saved_record_index;
|
||||
|
||||
Dirty_State dirty;
|
||||
File_Save_State save_state;
|
||||
|
||||
|
|
Loading…
Reference in New Issue