예제 #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))
예제 #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))
예제 #3
0
 def grpdestroy(self, group, ms_name):
     microstructure = self.toolbox.findMicrostructure()
     if microstructure and microstructure.name() == ms_name:
         self.update(self.toolbox.currentPixel())
예제 #4
0
 def grpschngd(self, ms_name):
     microstructure = self.toolbox.findMicrostructure()
     if microstructure and microstructure.name() == ms_name:
         self.update(self.toolbox.currentPixel())
예제 #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())
예제 #6
0
 def grpdestroy(self, group, ms_name):
     microstructure = self.toolbox.findMicrostructure()
     if microstructure and microstructure.name() == ms_name:
         self.update(self.toolbox.currentPixel())                
예제 #7
0
 def grpschngd(self, ms_name):
     microstructure = self.toolbox.findMicrostructure()
     if microstructure and microstructure.name() == ms_name:
         self.update(self.toolbox.currentPixel())
예제 #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())