diff --git a/src/Mod/Fem/Gui/DlgSettingsFemCcx.ui b/src/Mod/Fem/Gui/DlgSettingsFemCcx.ui index b469faff1d..5c746a293f 100644 --- a/src/Mod/Fem/Gui/DlgSettingsFemCcx.ui +++ b/src/Mod/Fem/Gui/DlgSettingsFemCcx.ui @@ -7,7 +7,7 @@ 0 0 425 - 640 + 642 @@ -291,7 +291,7 @@ - Number of CPU's to use (Spooles only) + Number of CPU's to use @@ -434,6 +434,9 @@ + + Qt::DefaultContextMenu + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -786,38 +789,6 @@ - - cb_int_editor - toggled(bool) - l_ext_editor - setEnabled(bool) - - - 406 - 65 - - - 148 - 88 - - - - - cb_int_editor - toggled(bool) - fc_ext_editor - setEnabled(bool) - - - 406 - 65 - - - 406 - 88 - - - cb_int_editor toggled(bool) @@ -850,38 +821,6 @@ - - cb_ccx_binary_std - toggled(bool) - l_ccx_binary_path - setEnabled(bool) - - - 406 - 45 - - - 148 - 68 - - - - - cb_ccx_binary_std - toggled(bool) - fc_ccx_binary_path - setEnabled(bool) - - - 406 - 45 - - - 406 - 68 - - - cb_ccx_binary_std toggled(bool) diff --git a/src/Mod/Fem/Gui/DlgSettingsFemCcxImp.cpp b/src/Mod/Fem/Gui/DlgSettingsFemCcxImp.cpp index defb261e8a..f3f5b5ff30 100644 --- a/src/Mod/Fem/Gui/DlgSettingsFemCcxImp.cpp +++ b/src/Mod/Fem/Gui/DlgSettingsFemCcxImp.cpp @@ -24,6 +24,9 @@ ***************************************************************************/ #include "PreCompiled.h" +#ifndef _PreComp_ +# include +#endif #include @@ -41,6 +44,11 @@ DlgSettingsFemCcxImp::DlgSettingsFemCcxImp(QWidget* parent) // set ranges ui->dsb_ccx_analysis_time->setMaximum(FLOAT_MAX); ui->dsb_ccx_initial_time_step->setMaximum(FLOAT_MAX); + // determine number of CPU cores + auto processor_count = std::thread::hardware_concurrency(); + // hardware check might fail and then returns 0 + if (processor_count > 0) + ui->sb_ccx_numcpu->setMaximum(processor_count); } DlgSettingsFemCcxImp::~DlgSettingsFemCcxImp()