()
| 520 | self.top_index = clamp(self.top_index, self.selected_index - get_line_amount() + 1, self.selected_index) |
| 521 | |
| 522 | def get_line_amount(): |
| 523 | preferences = get_addon_preferences() |
| 524 | if preferences is None: return 8 |
| 525 | else: return preferences.line_amount |
| 526 | def get_addon_preferences(): |
| 527 | addon = bpy.context.user_preferences.addons.get(get_addon_name()) |
| 528 | if addon is None: return None |
no test coverage detected