5151
5252LOG = mmSolver .logger .get_logger ()
5353
54- # Lookup tables derived from the ordered index lists in constant.py.
55- #
56- # TODO: Hard-code these variables and move them to the constant.py
57- # file.
58- _ADJUSTMENT_SOLVER_CONST_TO_INDEX = {
59- v : i for i , v in enumerate (const .ADJUSTMENT_SOLVER_TYPE_INDEX_LIST )
60- }
61- _LOG_LEVEL_CONST_TO_INDEX = {v : i for i , v in enumerate (const .LOG_LEVEL_INDEX_LIST )}
62-
6354
6455def find_group_box_spacer (outer_layout , widget_before , widget_after ):
6556 """Return the QSpacerItem sitting between two widgets in a layout, or None.
@@ -279,7 +270,7 @@ def populateUi(self):
279270 const .SCENE_OPTION_ADJUSTMENT_SOLVER_TYPE ,
280271 default = const .DEFAULT_ADJUSTMENT_SOLVER_TYPE ,
281272 )
282- adjustment_solver_index = _ADJUSTMENT_SOLVER_CONST_TO_INDEX .get (
273+ adjustment_solver_index = const . ADJUSTMENT_SOLVER_TO_INDEX .get (
283274 adjustment_solver_type , 0
284275 )
285276 self .adjustmentSolver_comboBox .setCurrentIndex (adjustment_solver_index )
@@ -290,7 +281,7 @@ def populateUi(self):
290281 const .SCENE_OPTION_LOG_LEVEL ,
291282 default = const .DEFAULT_LOG_LEVEL ,
292283 )
293- log_level_index = _LOG_LEVEL_CONST_TO_INDEX .get (log_level , 2 )
284+ log_level_index = const . LOG_LEVEL_TO_INDEX .get (log_level , 2 )
294285 self .logLevel_comboBox .setCurrentIndex (log_level_index )
295286
296287 # Focal length range.
0 commit comments