diff --git a/src/Mod/Fem/Gui/DlgSettingsFemGmsh.ui b/src/Mod/Fem/Gui/DlgSettingsFemGmsh.ui
index acddbffe75..e6981dc9f2 100644
--- a/src/Mod/Fem/Gui/DlgSettingsFemGmsh.ui
+++ b/src/Mod/Fem/Gui/DlgSettingsFemGmsh.ui
@@ -6,8 +6,8 @@
0
0
- 400
- 105
+ 420
+ 193
@@ -55,6 +55,12 @@
false
+
+
+ 0
+ 0
+
+
100
@@ -111,6 +117,45 @@
+ -
+
+
+ Options
+
+
+
-
+
+
-
+
+
+ Log verbosity
+
+
+
+ -
+
+
+ Level of verbosity printed on the task panel
+
+
+ QComboBox::AdjustToContents
+
+
+ LogVerbosity
+
+
+ Mod/Fem/Gmsh
+
+
+
+
+
+
+
+
+
+
+
-
@@ -143,6 +188,11 @@
QCheckBox
+
+ Gui::PrefComboBox
+ QComboBox
+
+
diff --git a/src/Mod/Fem/Gui/DlgSettingsFemGmshImp.cpp b/src/Mod/Fem/Gui/DlgSettingsFemGmshImp.cpp
index 2ff0868086..3c0f8b6d91 100644
--- a/src/Mod/Fem/Gui/DlgSettingsFemGmshImp.cpp
+++ b/src/Mod/Fem/Gui/DlgSettingsFemGmshImp.cpp
@@ -27,6 +27,7 @@
#include
#endif
+#include
#include "DlgSettingsFemGmshImp.h"
#include "ui_DlgSettingsFemGmsh.h"
@@ -51,12 +52,16 @@ void DlgSettingsFemGmshImp::saveSettings()
{
ui->cb_gmsh_binary_std->onSave();
ui->fc_gmsh_binary_path->onSave();
+ ui->cb_log_verbosity->onSave();
}
void DlgSettingsFemGmshImp::loadSettings()
{
ui->cb_gmsh_binary_std->onRestore();
ui->fc_gmsh_binary_path->onRestore();
+
+ populateLogVerbosity();
+ ui->cb_log_verbosity->onRestore();
}
/**
@@ -83,4 +88,26 @@ void DlgSettingsFemGmshImp::onfileNameChanged(QString FileName)
}
}
+void DlgSettingsFemGmshImp::populateLogVerbosity()
+{
+ std::list> mapValues = {{"Silent", 0},
+ {"Errors", 1},
+ {"Warnings", 2},
+ {"Direct", 3},
+ {"Information", 4},
+ {"Status", 5},
+ {"Debug", 99}};
+
+ for (const auto& val : mapValues) {
+ ui->cb_log_verbosity->addItem(QString::fromStdString(val.first),
+ QString::number(val.second));
+ }
+
+ auto hGrp = App::GetApplication().GetParameterGroupByPath(
+ "User parameter:BaseApp/Preferences/Mod/Fem/Gmsh");
+ std::string current = hGrp->GetASCII("LogVerbosity", "3");
+ int index = ui->cb_log_verbosity->findData(QString::fromStdString(current));
+ ui->cb_log_verbosity->setCurrentIndex(index);
+}
+
#include "moc_DlgSettingsFemGmshImp.cpp"
diff --git a/src/Mod/Fem/Gui/DlgSettingsFemGmshImp.h b/src/Mod/Fem/Gui/DlgSettingsFemGmshImp.h
index 18a04590cc..66f77c4a22 100644
--- a/src/Mod/Fem/Gui/DlgSettingsFemGmshImp.h
+++ b/src/Mod/Fem/Gui/DlgSettingsFemGmshImp.h
@@ -47,6 +47,7 @@ protected:
void saveSettings() override;
void loadSettings() override;
void changeEvent(QEvent* e) override;
+ void populateLogVerbosity();
private:
std::unique_ptr ui;
diff --git a/src/Mod/Fem/femmesh/gmshtools.py b/src/Mod/Fem/femmesh/gmshtools.py
index 6feebb75ff..33093165b2 100644
--- a/src/Mod/Fem/femmesh/gmshtools.py
+++ b/src/Mod/Fem/femmesh/gmshtools.py
@@ -219,7 +219,10 @@ class GmshTools:
self.write_gmsh_input_files()
def compute(self):
- command_list = ["-v", "4", "-", self.temp_file_geo]
+ log_level = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Fem/Gmsh").GetString(
+ "LogVerbosity", "3"
+ )
+ command_list = ["-v", log_level, "-", self.temp_file_geo]
self.process.start(self.gmsh_bin, command_list)
return self.process