App/Gui: introduce temporary document
Add new argument to Application::newDocument() to create a temporary
document. Also exposed to Python API App.newDocument() with a named
argument 'temp'.
The temporary document is marked with status bit 'TempDoc'. The user
will not be prompt for saving when closing. The undo/redo is disabled.
The AutoSaver skips it. And the tree view will not show it.
PropertyXLink allows linking to/from object within a temporary document
without saving.
This commit is contained in:
@@ -678,7 +678,9 @@ bool MainWindow::closeAllDocuments (bool close)
|
||||
continue;
|
||||
if(!gdoc->canClose(false))
|
||||
return false;
|
||||
if(!gdoc->isModified() || doc->testStatus(App::Document::PartialDoc))
|
||||
if(!gdoc->isModified()
|
||||
|| doc->testStatus(App::Document::PartialDoc)
|
||||
|| doc->testStatus(App::Document::TempDoc))
|
||||
continue;
|
||||
bool save = saveAll;
|
||||
if(!save && checkModify) {
|
||||
|
||||
Reference in New Issue
Block a user