[FEM] fix enable editing for all solvers

- currently for Z88 nothing happens when clicking the Edit button in the solver task dialog. The reason is that opening *.txt files was never implemented
- also do this for Elmer
- for Z88 we need to open several file for a proper editing because the solver info is distributed over these files
This commit is contained in:
Uwe
2022-08-04 04:19:55 +02:00
parent 34e45fbcac
commit d53714bc84
3 changed files with 43 additions and 3 deletions

View File

@@ -125,11 +125,14 @@ private:
}
}
if (ext == QLatin1String("inp")) {
if ( (ext == QLatin1String("inp"))
|| (ext == QLatin1String("sif"))
|| (ext == QLatin1String("txt")) ) {
Gui::TextEditor* editor = new Gui::TextEditor();
editor->setWindowIcon(Gui::BitmapFactory().pixmap(":/icons/fem-solver-inp-editor.svg"));
Gui::EditorView* edit = new Gui::EditorView(editor, Gui::getMainWindow());
editor->setSyntaxHighlighter(new FemGui::AbaqusHighlighter(editor));
if (ext == QLatin1String("inp"))
editor->setSyntaxHighlighter(new FemGui::AbaqusHighlighter(editor));
edit->setDisplayName(Gui::EditorView::FileName);
edit->open(fileName);
edit->resize(400, 300);