Skip to content

Commit e40df3c

Browse files
committed
Fixed branch lines showing in pyinstaller build
1 parent 057fc44 commit e40df3c

File tree

3 files changed

+25
-20
lines changed

3 files changed

+25
-20
lines changed

Modules/parameterTree.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class ParameterTree(QTreeWidget):
1717
addOption = pyqtSignal(QTreeWidgetItem)
1818
itemRemoved = pyqtSignal(QTreeWidgetItem, int)
1919

20-
def __init__(self, profile: dict):
20+
def __init__(self, profile: dict, parent=None):
2121
"""
2222
Data table:
2323
All data is in column 0.
@@ -30,7 +30,7 @@ def __init__(self, profile: dict):
3030
37 - List of QModelIndex to items that this depends on.
3131
3232
"""
33-
super().__init__()
33+
super().__init__(parent=parent)
3434

3535
self.favorite = False
3636

core.py

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@ def build_gui(self):
174174
self.tab2_download_lineedit.setContextMenuPolicy(Qt.ActionsContextMenu)
175175

176176
# Sets up the parameter tree.
177-
self.tab2_options = ParameterTree(options)
178-
self.tab2_favorites = ParameterTree(favorites)
177+
self.tab2_options = ParameterTree(options, self)
178+
self.tab2_favorites = ParameterTree(favorites, self)
179179
self.tab2_favorites.favorite = True
180180

181181
self.tab2_download_option = self.find_download_widget()
@@ -442,6 +442,27 @@ def build_gui(self):
442442
QTreeWidget::indicator:unchecked {{
443443
image: url({self.unchecked_icon});
444444
}}
445+
446+
QTreeWidget::branch {{
447+
image: none;
448+
border-image: none;
449+
}}
450+
451+
QTreeWidget::branch:has-siblings:!adjoins-item {{
452+
image: none;
453+
border-image: none;
454+
}}
455+
456+
QTreeWidget::branch:has-siblings:adjoins-item {{
457+
border-image: none;
458+
image: none;
459+
}}
460+
461+
QTreeWidget::branch:!has-children:!has-siblings:adjoins-item {{
462+
border-image: none;
463+
image: none;
464+
}}
465+
445466
"""
446467
### Configuration main widget.
447468
# Adds tabs to the tab widget, and names the tabs.

utils/utilities.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -457,22 +457,6 @@ def _validate_settings(self):
457457
selection-background-color: blue;
458458
}}
459459
460-
QTreeWidget::branch {{
461-
border-image: none 0;
462-
}}
463-
464-
QTreeWidget::branch:has-siblings:!adjoins-item {{
465-
border-image: none 0;
466-
}}
467-
468-
QTreeWidget::branch:has-siblings:adjoins-item {{
469-
border-image: none 0;
470-
}}
471-
472-
QTreeWidget::branch:!has-children:!has-siblings:adjoins-item {{
473-
border-image: none 0;
474-
}}
475-
476460
QTreeWidget::item {{
477461
height: 16px;
478462
}}

0 commit comments

Comments
 (0)