Salome HOME
updated copyright message
[modules/yacs.git] / src / genericgui / QtGuiContext.cxx
index 572fe43aa9ff2095df15fa80f5e3336157d51b0b..576b76b9e320c3223613ba087543a968ef485879 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2006-2014  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
@@ -23,6 +23,7 @@
 
 //#define _DEVDEBUG_
 #include "YacsTrace.hxx"
+#include "chrono.hxx"
 
 using namespace std;
 using namespace YACS::ENGINE;
@@ -46,11 +47,8 @@ QtGuiContext::QtGuiContext(GenericGui *gmain) : GuiContext()
   _stackedWidget = 0;
   _guiExecutor = 0;
   _selectedSubject = 0;
-  _subjectToCut = 0;
-  _subjectToCopy = 0;
   _isEdition = true;
   _isLoadingPresentation = false;
-  _studyId = 0;
   _fileName = QString();
   _mapOfSchemaItem.clear();
   _mapOfSceneItem.clear();
@@ -74,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)