From b89e29ad26bf3988a6508b452fb3b9db421b01dd Mon Sep 17 00:00:00 2001 From: HONGJS Date: Thu, 28 Mar 2019 20:14:57 +0900 Subject: [PATCH] fixed the bug that does not change serial option value --- Preferences.py | 4 ++-- graphicsInterface.py | 4 ++-- uPyCraft.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Preferences.py b/Preferences.py index 0dc7497..89ef7ea 100644 --- a/Preferences.py +++ b/Preferences.py @@ -116,7 +116,7 @@ def __init__(self,parent=None): self.setLayout(detailLayout) class Preferences(QDialog): - def __init__(self,parent=None): + def __init__(self,serialWidget,parent=None): super(Preferences,self).__init__(parent) self.widget=QWidget() layout=QGridLayout(self.widget) @@ -126,7 +126,7 @@ def __init__(self,parent=None): tabWidget=QTabWidget() tabWidget.setTabPosition(QTabWidget.West); - tabWidget.addTab(SerialWidget(self),"Serial") + tabWidget.addTab(serialWidget,"Serial") tabWidget.addTab(self.landlocation,"Languare Location") tabWidget.addTab(self.configUpdate,"config") layout.addWidget(tabWidget,1,0) diff --git a/graphicsInterface.py b/graphicsInterface.py index 4f65174..c11291d 100644 --- a/graphicsInterface.py +++ b/graphicsInterface.py @@ -249,7 +249,7 @@ def __init__(self,parent=None): self.setLayout(detailLayout) class Preferences(QDialog): - def __init__(self,parent=None): + def __init__(self,serialWidget,parent=None): super(Preferences,self).__init__(parent) self.setWindowFlags(Qt.WindowCloseButtonHint)#HelpButtonHint? self.setStyleSheet("""QDialog{background-color: rgb(236, 236, 236);color:black;} @@ -264,7 +264,7 @@ def __init__(self,parent=None): tabWidget.setTabPosition(QTabWidget.North); tabWidget.addTab(self.configUpdate,"config") tabWidget.addTab(self.landlocation,"Languare Location") - tabWidget.addTab(SerialWidget(self),"Serial") + tabWidget.addTab(serialWidget,"Serial") layout.addWidget(tabWidget,1,0) self.setLayout(layout) diff --git a/uPyCraft.py b/uPyCraft.py index 93f7ea6..41a8431 100644 --- a/uPyCraft.py +++ b/uPyCraft.py @@ -151,7 +151,7 @@ def __init__(self,parent=None): #create graphics interface self.createGraphicsInterface() #create Preferences - self.preferencesDialog=Preferences() + self.preferencesDialog=Preferences(self.myserial) #thread