-// Copyright (C) 2006-2014 CEA/DEN, EDF R&D
+// Copyright (C) 2006-2016 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
QString aCall = "salomeloader."+ fileExt+ " "+ fn + " " + tmpFileName + " > " + tmpOutput;
DEBTRACE(aCall.toStdString());
- int ret = system(aCall.toAscii());
+ int ret = system(aCall.toLatin1());
if(ret != 0)
{
// --- read file with logs
- fstream f(tmpOutput.toAscii());
+ fstream f(tmpOutput.toLatin1());
stringstream hfile;
hfile << f.rdbuf();
f.close();
filters << "XML files (*.xml)"
<< "Any files (*)";
dialog.setFileMode(QFileDialog::AnyFile);
- dialog.setFilters(filters);
- dialog.selectFilter("(*.xml)");
+ dialog.setNameFilters(filters);
+ dialog.selectNameFilter("(*.xml)");
dialog.setDefaultSuffix("xml");
dialog.setConfirmOverwrite(true);
//dialog.setConfirmOverwrite(false); // bug Qt4.3.3
{
DEBTRACE("GenericGui::onUndo");
if (QtGuiContext::getQtCurrent()->_setOfModifiedSubjects.empty())
+ {
QtGuiContext::getQtCurrent()->getInvoc()->undo();
+ // Empty the clipboard in order to avoid the copy of a destroyed object.
+ QtGuiContext::getQtCurrent()->setSubjectToCopy(NULL);
+ }
else Message("undo not possible when there are local modifications not confirmed");
}
{
DEBTRACE("GenericGui::onRedo");
if (QtGuiContext::getQtCurrent()->_setOfModifiedSubjects.empty())
+ {
QtGuiContext::getQtCurrent()->getInvoc()->redo();
+ // Empty the clipboard in order to avoid the copy of a destroyed object.
+ QtGuiContext::getQtCurrent()->setSubjectToCopy(NULL);
+ }
else Message("redo not possible when there are local modifications not confirmed");
}