Salome HOME
Merge branch 'V7_dev' into V8_0_0_BR
[modules/yacs.git] / src / genericgui / GuiEditor.cxx
index abf13197cacdd1475b176f95f93ed1af1d3f8079..da78dbb9de729622b246972ab5542d99ed4ab209 100644 (file)
@@ -456,6 +456,8 @@ void GuiEditor::DeleteSubject(Subject* parent,
   toRemove->askRegisterUndoDestroy();
   if(!parent->destroy(toRemove))
     Message mess;
+  // Empty the clipboard in order to avoid the copy of a destroyed object.
+  QtGuiContext::getQtCurrent()->setSubjectToCopy(NULL);
 }
 
 void GuiEditor::CutSubject()
@@ -714,7 +716,7 @@ void GuiEditor::showRedo(QWidget *parent)
 QString GuiEditor::asciiFilter(const QString & name)
 {
   DEBTRACE(name.toStdString());
-  string aName = name.toAscii().data();
+  string aName = name.toLatin1().data();
   DEBTRACE(aName);
   for (int i=0; i < aName.size(); i++)
     {