objective c - NSDocument isDocumentEdited and undo -


in document-based application, every user action add entry in undomanager, including selection, meaning 'undo' restore previous selection.

some times user open document, view items selecting them , close document, if user didn't 'alter' anything, user asked save changes, annoying , can misleading user.

it seems document's dirty flag (isdocumentedited) automatically set when registering undo actions, there way can prevent particualr undoable actions, such selection change?

thanks!

you should able call -setactionisdiscardable:yes on undomanager when register actions don’t need saved.


Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -