summaryrefslogtreecommitdiff
path: root/src/main/python/main.py
diff options
context:
space:
mode:
authorpravindalve2023-05-30 04:25:53 +0530
committerGitHub2023-05-30 04:25:53 +0530
commit8e09aa34555a1933882c2955cb74e190fd3d39bc (patch)
tree68ec6c59c541077cb380a1c24de833211a5554fb /src/main/python/main.py
parente6037f33bdd8c349d8bb739d1e2765ba49d6e2dc (diff)
parent7c896bf85270c717d9c257629d0f76333f43fa0c (diff)
downloadChemical-PFD-8e09aa34555a1933882c2955cb74e190fd3d39bc.tar.gz
Chemical-PFD-8e09aa34555a1933882c2955cb74e190fd3d39bc.tar.bz2
Chemical-PFD-8e09aa34555a1933882c2955cb74e190fd3d39bc.zip
Merge pull request #31 from brenda-br/Delete-Function-Added
Triangular Grip, Reposition Line Grips, Modification on Size Grip and Select, Delete Function fixed, Restrict Movable Area
Diffstat (limited to 'src/main/python/main.py')
-rw-r--r--src/main/python/main.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/main/python/main.py b/src/main/python/main.py
index 3aa8e6a..5af252d 100644
--- a/src/main/python/main.py
+++ b/src/main/python/main.py
@@ -104,12 +104,12 @@ class appWindow(QMainWindow):
#call to create a new file inside mdi area
project = FileWindow(self.mdi)
project.setObjectName("New Project")
+ project.setWindowFlags(Qt.FramelessWindowHint)
self.mdi.addSubWindow(project)
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
- self.mdi.setViewMode(QMdiArea.TabbedView)
+ self.mdi.setViewMode(QMdiArea.TabbedView)
project.show()
def openProject(self):
@@ -126,9 +126,7 @@ class appWindow(QMainWindow):
project.resizeHandler()
project.fileCloseEvent.connect(self.fileClosed)
project.show()
- if self.count > 1:
- # self.tabSpace.setVisible(True)
- self.mdi.setViewMode(QMdiArea.TabbedView)
+ self.mdi.setViewMode(QMdiArea.TabbedView)
def saveProject(self):
#serialize all files in mdi area
@@ -169,9 +167,10 @@ class appWindow(QMainWindow):
self.writeSettings()
def fileClosed(self, index):
+ pass
#checks if the file tab menu needs to be removed
- if self.count <= 2 :
- self.mdi.setViewMode(QMdiArea.SubWindowView)
+ # if self.count <= 1 :
+ # self.mdi.setViewMode(QMdiArea.SubWindowView)
def writeSettings(self):
# write window state on window close