Fix bug if document owns several views
This commit is contained in:
parent
eb55a5a5d5
commit
238750d3e4
|
@ -860,8 +860,13 @@ void Application::tryClose(QCloseEvent * e)
|
|||
// ask all documents if closable
|
||||
std::map<const App::Document*, Gui::Document*>::iterator It;
|
||||
for (It = d->documents.begin();It!=d->documents.end();It++) {
|
||||
// a document may have several views attached, so ask it directly
|
||||
#if 0
|
||||
MDIView* active = It->second->getActiveView();
|
||||
e->setAccepted(active->canClose());
|
||||
#else
|
||||
e->setAccepted(It->second->canClose());
|
||||
#endif
|
||||
if (!e->isAccepted())
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -826,6 +826,7 @@ void Document::createView(const char* sType)
|
|||
.arg(QString::fromUtf8(name)).arg(d->_iWinCount++);
|
||||
|
||||
view3D->setWindowTitle(title);
|
||||
view3D->setWindowModified(this->isModified());
|
||||
view3D->setWindowIcon(QApplication::windowIcon());
|
||||
view3D->resize(400, 300);
|
||||
getMainWindow()->addWindow(view3D);
|
||||
|
|
Loading…
Reference in New Issue
Block a user