Exemplo n.º 1
0
 def update_thread(self, where):
     debug.subthreadTest()
     microstructure = self.toolbox.findMicrostructure()
     if microstructure and where is not None:
         mscntxt = ooflib.common.microstructure.getMSContextFromMS(
             microstructure)
         msname = microstructure.name()
         mscntxt.begin_reading()
         try:
             names = pixelgroup.pixelGroupNames(microstructure, where)
         finally:
             mscntxt.end_reading()
         grpnames = '\n'.join(names)
     else:
         msname = '(No microstructure)'
         grpnames = ''
     mainthread.runBlock(self.reallyupdate, (msname, grpnames))
Exemplo n.º 2
0
 def update_thread(self, where):
     debug.subthreadTest()
     microstructure = self.toolbox.findMicrostructure()
     if microstructure and where is not None:
         mscntxt = ooflib.common.microstructure.getMSContextFromMS(
             microstructure)
         msname = microstructure.name()
         mscntxt.begin_reading()
         try:
             names = pixelgroup.pixelGroupNames(microstructure, where)
         finally:
             mscntxt.end_reading()
         grpnames = '\n'.join(names)
     else:
         msname = '(No microstructure)'
         grpnames = ''
     mainthread.runBlock(self.reallyupdate, (msname, grpnames))
Exemplo n.º 3
0
 def grpdestroy(self, group, ms_name):
     microstructure = self.toolbox.findMicrostructure()
     if microstructure and microstructure.name() == ms_name:
         self.update(self.toolbox.currentPixel())
Exemplo n.º 4
0
 def grpschngd(self, ms_name):
     microstructure = self.toolbox.findMicrostructure()
     if microstructure and microstructure.name() == ms_name:
         self.update(self.toolbox.currentPixel())
Exemplo n.º 5
0
 def grpchanged(self, group, ms_name):
     microstructure = self.toolbox.findMicrostructure()
     if microstructure and microstructure.name() == ms_name:
         if group.name() in microstructure.groupNames():
             self.update(self.toolbox.currentPixel())
Exemplo n.º 6
0
 def grpdestroy(self, group, ms_name):
     microstructure = self.toolbox.findMicrostructure()
     if microstructure and microstructure.name() == ms_name:
         self.update(self.toolbox.currentPixel())                
Exemplo n.º 7
0
 def grpschngd(self, ms_name):
     microstructure = self.toolbox.findMicrostructure()
     if microstructure and microstructure.name() == ms_name:
         self.update(self.toolbox.currentPixel())
Exemplo n.º 8
0
 def grpchanged(self, group, ms_name):
     microstructure = self.toolbox.findMicrostructure()
     if microstructure and microstructure.name() == ms_name:
         if group.name() in microstructure.groupNames():
             self.update(self.toolbox.currentPixel())