Gui: do not prompt when closing view of temp document
This commit is contained in:
@@ -1989,6 +1989,9 @@ bool Document::canClose (bool checkModify, bool checkLink)
|
||||
if (checkLink && App::PropertyXLink::getDocumentInList(getDocument()).size())
|
||||
return true;
|
||||
|
||||
if (getDocument()->testStatus(App::Document::TempDoc))
|
||||
return true;
|
||||
|
||||
bool ok = true;
|
||||
if (checkModify && isModified() && !getDocument()->testStatus(App::Document::PartialDoc)) {
|
||||
const char *docName = getDocument()->Label.getValue();
|
||||
|
||||
@@ -183,6 +183,9 @@ bool MDIView::onHasMsg(const char* pMsg) const
|
||||
|
||||
bool MDIView::canClose(void)
|
||||
{
|
||||
if (getAppDocument() && getAppDocument()->testStatus(App::Document::TempDoc))
|
||||
return true;
|
||||
|
||||
if (!bIsPassive && getGuiDocument() && getGuiDocument()->isLastView()) {
|
||||
this->setFocus(); // raises the view to front
|
||||
return (getGuiDocument()->canClose(true,true));
|
||||
|
||||
Reference in New Issue
Block a user