Skip to content
Snippets Groups Projects
Commit 8401249b authored by Francois Henrotte's avatar Francois Henrotte
Browse files

function willCompute(client) added

parent 2248d568
No related branches found
No related tags found
No related merge requests found
...@@ -517,7 +517,7 @@ class client : ...@@ -517,7 +517,7 @@ class client :
choices=solFiles, readOnly=1) choices=solFiles, readOnly=1)
for i in solFiles: for i in solFiles:
if not self.fileExists(i) : if not self.fileExists(i) :
self.setChanged(client, True) self.setChanged(client, 'true')
return solFiles return solFiles
def needsCompute(self, client) : def needsCompute(self, client) :
...@@ -525,13 +525,19 @@ class client : ...@@ -525,13 +525,19 @@ class client :
# Otherwise, stop using restored solutions when the client elmer has changed # Otherwise, stop using restored solutions when the client elmer has changed
if self.useRestoredSolution() == 2: # we have just loaded a database if self.useRestoredSolution() == 2: # we have just loaded a database
self.setRestoredSolution(1) self.setRestoredSolution(1)
self.setChanged(client, 0) # do not compute self.setChanged(client, 'false') # do not compute
else : else :
if self.isChanged(client): if self.isChanged(client):
self.setRestoredSolution(0) self.setRestoredSolution(0)
return True return True
return False return False
def willCompute(self, client) : # Inform user about the value of needsCompute
if self.useRestoredSolution() == 2: # special value
return False
else :
return True if self.isChanged(client) else False
def useRestoredSolution(self) : def useRestoredSolution(self) :
return self.getNumber('0Metamodel/9Use restored solution') return self.getNumber('0Metamodel/9Use restored solution')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment