X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2Fgenericgui%2FGuiEditor.cxx;h=2b42cccc93ff5cff219c10c142533104c6f19a28;hb=fd4934f49ee2770cd881b0f25a4bb00b12183b68;hp=da2237e89ceccaa4ae3984c7be246b0743c26a04;hpb=09cbf696c05bcf689364417ad0f97a34ca938cdc;p=modules%2Fyacs.git diff --git a/src/genericgui/GuiEditor.cxx b/src/genericgui/GuiEditor.cxx index da2237e89..2b42cccc9 100644 --- a/src/genericgui/GuiEditor.cxx +++ b/src/genericgui/GuiEditor.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2006-2014 CEA/DEN, EDF R&D +// Copyright (C) 2006-2020 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 @@ -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++) {