- made sure that if the OR-TOOLS package is not installed then the options in the Preferences for the related optimizations are disabled

This commit is contained in:
Marius Stanciu
2021-11-20 19:41:52 +02:00
committed by Marius
parent 640739cc65
commit b494669ca0
6 changed files with 32 additions and 11 deletions

View File

@@ -171,6 +171,13 @@ class GeometryGenPrefGroupUI(OptionsGroupUI):
self.optimization_time_label.setDisabled(True)
self.optimization_time_entry.setDisabled(True)
try:
import ortools
except ModuleNotFoundError:
self.opt_algorithm_radio.setOptionsDisabled([_('MetaHeuristic'), _('Basic')], True)
self.optimization_time_label.setDisabled(True)
self.optimization_time_entry.setDisabled(True)
self.opt_algorithm_radio.activated_custom.connect(self.optimization_selection)
# Setting plot colors signals