chore: update ui service manager of new service
This commit is contained in:
@@ -146,7 +146,7 @@ class ServiceManagerUI(BaseModel):
|
||||
|
||||
def update_xml(self, service: Service, ui_name: str, panelcmd: str) -> None:
|
||||
num_macro_elements = self._update_macro(service=service, ui_name=ui_name, panelcmd=panelcmd)
|
||||
self._update_heights(num_macro_elemnts=num_macro_elements)
|
||||
self._update_heights(num_macro_elements=num_macro_elements)
|
||||
|
||||
def _update_macro(self, service: Service, ui_name: str, panelcmd: str) -> int:
|
||||
new_macro_element = _ServiceManagerUIMacroElement(
|
||||
@@ -175,7 +175,7 @@ class ServiceManagerUI(BaseModel):
|
||||
assert num_macro_elements is not None, "could not find number of macro elements in xml"
|
||||
return num_macro_elements
|
||||
|
||||
def _update_heights(self, num_macro_elemnts: int) -> None:
|
||||
def _update_heights(self, num_macro_elements: int) -> None:
|
||||
"""
|
||||
There are 3 heights to be adjusted:
|
||||
|
||||
@@ -186,7 +186,9 @@ class ServiceManagerUI(BaseModel):
|
||||
root = self.tree.getroot()
|
||||
|
||||
ca_include_height = self._get_height_cainclude()
|
||||
height_to_add = ca_include_height / num_macro_elemnts * (num_macro_elemnts + 1)
|
||||
height_to_add = (
|
||||
ca_include_height / num_macro_elements * (num_macro_elements + 1)
|
||||
) - ca_include_height
|
||||
|
||||
# 1. Main window
|
||||
mainwindow = root.find(".//widget[@class='QMainWindow']")
|
||||
|
||||
Reference in New Issue
Block a user