summaryrefslogtreecommitdiff
path: root/src/main/python
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/python')
-rw-r--r--src/main/python/main.py4
-rw-r--r--src/main/python/utils/toolbar.py1
2 files changed, 3 insertions, 2 deletions
diff --git a/src/main/python/main.py b/src/main/python/main.py
index 3aa8e6a..bf94a5b 100644
--- a/src/main/python/main.py
+++ b/src/main/python/main.py
@@ -108,7 +108,7 @@ class appWindow(QMainWindow):
if not project.tabList: # important when unpickling a file instead
project.newDiagram() #create a new tab in the new file
project.fileCloseEvent.connect(self.fileClosed) #closed file signal to switch to sub window view
- if self.count > 1: #switch to tab view if needed
+ if self.count > 0: #switch to tab view if needed
self.mdi.setViewMode(QMdiArea.TabbedView)
project.show()
@@ -170,7 +170,7 @@ class appWindow(QMainWindow):
def fileClosed(self, index):
#checks if the file tab menu needs to be removed
- if self.count <= 2 :
+ if self.count <= 1 :
self.mdi.setViewMode(QMdiArea.SubWindowView)
def writeSettings(self):
diff --git a/src/main/python/utils/toolbar.py b/src/main/python/utils/toolbar.py
index dbfff22..69618f0 100644
--- a/src/main/python/utils/toolbar.py
+++ b/src/main/python/utils/toolbar.py
@@ -31,6 +31,7 @@ class toolbar(QDockWidget):
self.setWindowFlags(Qt.FramelessWindowHint)
self.searchBox = QLineEdit(self.widget) #search box to search through componenets
+ self.searchBox.setStyleSheet("QLineEdit {background-color: white;color: black}") #set color of searchBox
#connect signal to filter slot, add searchbar to toolbar
self.searchBox.textChanged.connect(self.searchQuery)