summaryrefslogtreecommitdiff
path: root/src/frontEnd/ProjectExplorer.py
diff options
context:
space:
mode:
authorfahim2015-06-05 17:23:39 +0530
committerfahim2015-06-05 17:23:39 +0530
commite68620ce4d4f8300059c384b2919acaf9c873374 (patch)
treef86367241a78e8441ed89e58454b7e72855487b7 /src/frontEnd/ProjectExplorer.py
parent687a4bf4cd1e027df9fb371d5c173c02d7db767b (diff)
downloadeSim-e68620ce4d4f8300059c384b2919acaf9c873374.tar.gz
eSim-e68620ce4d4f8300059c384b2919acaf9c873374.tar.bz2
eSim-e68620ce4d4f8300059c384b2919acaf9c873374.zip
Subject: Changes for saving previouse values
Description: Changes for saving previouse values of component entered by User.
Diffstat (limited to 'src/frontEnd/ProjectExplorer.py')
-rw-r--r--src/frontEnd/ProjectExplorer.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/frontEnd/ProjectExplorer.py b/src/frontEnd/ProjectExplorer.py
index b518d863..906001d5 100644
--- a/src/frontEnd/ProjectExplorer.py
+++ b/src/frontEnd/ProjectExplorer.py
@@ -87,9 +87,8 @@ class ProjectExplorer(QtGui.QWidget):
self.windowgrid = QtGui.QGridLayout()
if (os.path.isfile(str(self.filePath)))== True:
self.fopen = open(str(self.filePath), 'r')
- lines = self.fopen.readlines()
- for line in lines:
- self.text.append(line)
+ lines = self.fopen.read()
+ self.text.setText(lines)
QtCore.QObject.connect(self.text,QtCore.SIGNAL("textChanged()"), self.enable_save)
@@ -108,9 +107,7 @@ class ProjectExplorer(QtGui.QWidget):
def save_data(self):
self.fopen=open(self.filePath, 'w')
- lines = str(self.text.toPlainText()).split('\n')
- lines=[i+'\r' if i in lines[:-1] else i for i in lines]
- self.fopen.writelines(lines)
+ self.fopen.write(self.text.toPlainText())
self.fopen.close()
self.textwindow.close()