Salome HOME
updated copyright message
[modules/yacs.git] / src / genericgui / QtGuiContext.cxx
index 107c8fe995bd0b9eb1a71e702807e6f4cf996aac..576b76b9e320c3223613ba087543a968ef485879 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2006-2015  CEA/DEN, EDF R&D
+// Copyright (C) 2006-2023  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
@@ -49,7 +49,6 @@ QtGuiContext::QtGuiContext(GenericGui *gmain) : GuiContext()
   _selectedSubject = 0;
   _isEdition = true;
   _isLoadingPresentation = false;
-  _studyId = 0;
   _fileName = QString();
   _mapOfSchemaItem.clear();
   _mapOfSceneItem.clear();
@@ -73,6 +72,9 @@ QtGuiContext::~QtGuiContext()
   _current = 0;
   _QtCurrent = 0;
   _setOfContext.erase(this);
+  // Avoid any possible copy from the destroyed schema.
+  QClipboard *clipboard = QApplication::clipboard();
+  clipboard->setMimeData(NULL);
 }
 
 void QtGuiContext::setProc(YACS::ENGINE::Proc* proc)