It would be handy if FileBasedDocument::setChangedFlag() could be declared virtual, for example to allow a document to manage any changes in the user interface.
Then I would also change:
[code]void FileBasedDocument::changed()
{
changedSinceSave = true;
sendChangeMessage (this);
}
void FileBasedDocument::setFile (const File& newFile)
{
if (documentFile != newFile)
{
documentFile = newFile;
changedSinceSave = true;
}
}
[/code]
to:
[code]void FileBasedDocument::changed()
{
setChangedFlag (true);
sendChangeMessage (this);
}
void FileBasedDocument::setFile (const File& newFile)
{
if (documentFile != newFile)
{
documentFile = newFile;
setChangedFlag (true);
}
}
[/code]