excellon general

This commit is contained in:
David Robertson
2020-05-10 23:33:21 +01:00
parent 3a1089c277
commit 73479e75b6
5 changed files with 206 additions and 457 deletions

View File

@@ -302,7 +302,7 @@ class SeparatorOptionUI(OptionUI):
class FullWidthButtonOptionUI(OptionUI):
def __init__(self, option: str, label_text: str, label_tooltip: str):
def __init__(self, option: str, label_text: str, label_tooltip: Union[str, None]):
super().__init__(option=option)
self.label_text = label_text
self.label_tooltip = label_tooltip
@@ -310,7 +310,8 @@ class FullWidthButtonOptionUI(OptionUI):
def build_button_widget(self):
button = FCButton(_(self.label_text))
button.setToolTip(_(self.label_tooltip))
if self.label_tooltip is not None:
button.setToolTip(_(self.label_tooltip))
return button
def add_to_grid(self, grid: QtWidgets.QGridLayout, row: int) -> int: