mirror of
https://github.com/SELinuxProject/setools
synced 2025-03-22 19:16:34 +00:00
ApolMainWindow: change tab creation to put analysis widget in directly
No need to put an empty widget in.
This commit is contained in:
parent
93b35f6d65
commit
2b6b35e558
@ -192,19 +192,11 @@ class ApolMainWindow(SEToolsWidget, QMainWindow):
|
|||||||
self.tab_counter += 1
|
self.tab_counter += 1
|
||||||
counted_name = "{0}: {1}".format(self.tab_counter, tabtitle)
|
counted_name = "{0}: {1}".format(self.tab_counter, tabtitle)
|
||||||
|
|
||||||
newtab = QWidget()
|
newanalysis = tabclass(self, self._policy, self._permmap)
|
||||||
newtab.setObjectName(counted_name)
|
|
||||||
|
|
||||||
newanalysis = tabclass(newtab, self._policy, self._permmap)
|
|
||||||
newanalysis.setAttribute(Qt.WA_DeleteOnClose)
|
newanalysis.setAttribute(Qt.WA_DeleteOnClose)
|
||||||
|
newanalysis.setObjectName(counted_name)
|
||||||
|
|
||||||
# create a vertical layout in the tab, place the analysis ui inside.
|
index = self.AnalysisTabs.addTab(newanalysis, counted_name)
|
||||||
tabLayout = QVBoxLayout()
|
|
||||||
tabLayout.setContentsMargins(0, 0, 0, 0)
|
|
||||||
tabLayout.addWidget(newanalysis)
|
|
||||||
newtab.setLayout(tabLayout)
|
|
||||||
|
|
||||||
index = self.AnalysisTabs.addTab(newtab, counted_name)
|
|
||||||
self.AnalysisTabs.setTabToolTip(index, tabtitle)
|
self.AnalysisTabs.setTabToolTip(index, tabtitle)
|
||||||
self.AnalysisTabs.setCurrentIndex(index)
|
self.AnalysisTabs.setCurrentIndex(index)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user