-// Copyright (C) 2006-2016 CEA/DEN, EDF R&D
+// Copyright (C) 2006-2019 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
_parent->tabifyDockWidget(_dwStacked, _dwCatalogs);
if (_wrapper->objectBrowser())
_parent->tabifyDockWidget(_dwTree, _wrapper->objectBrowser());
-#if QT_VERSION >= 0x040500
_parent->setTabPosition(Qt::AllDockWidgetAreas, Resource::tabPanelsUp? QTabWidget::North: QTabWidget::South);
-#endif
//Import user catalog
std::string usercata=Resource::userCatalog.toStdString();
_catalogsWidget->addCatalogFromFile(usercata);
break;
}
}
- int studyId = _wrapper->activeStudyId();
- if (context->getStudyId() == studyId)
+ _wrapper->deleteSchema(view);
+ DEBTRACE("delete context");
+ if (GuiExecutor* exec = context->getGuiExecutor())
{
- _wrapper->deleteSchema(view);
- DEBTRACE("delete context");
- if (GuiExecutor* exec = context->getGuiExecutor())
- {
- exec->closeContext();
- }
- delete context;
- _mapViewContext.erase(view);
- switchContext(newView, onExit);
+ exec->closeContext();
}
+ delete context;
+ _mapViewContext.erase(view);
+ switchContext(newView, onExit);
return true;
}
GraphicsView* gView = new GraphicsView(viewWindow);
gView->setScene(scene);
gView->setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
- int studyId = _wrapper->AssociateViewToWindow(gView, viewWindow);
- context->setStudyId(studyId);
- std::ostringstream value;
- value << studyId;
- proc->setProperty("DefaultStudyID",value.str());
+ _wrapper->AssociateViewToWindow(gView, viewWindow);
context->setScene(scene);
context->setView(gView);
context->setWindow(viewWindow);
void GenericGui::onCleanOnExit()
{
DEBTRACE("GenericGui::onCleanOnExit");
- int studyId = _wrapper->activeStudyId();
map<QWidget*, YACS::HMI::QtGuiContext*> mapViewContextCopy = _mapViewContext;
map<QWidget*, YACS::HMI::QtGuiContext*>::iterator it = mapViewContextCopy.begin();
for (; it != mapViewContextCopy.end(); ++it)