示例#1
0
 def OnButtonDeleteUnusedButton(self, event):
     unused_list = []
     for (i, poscov) in enumerate(model.instrument.inst.positions):
         if not display_thread.is_position_selected(poscov):
             unused_list.append(i)
     self.ask_to_delete_several(unused_list, "all sample orientations in the list are checked as being used.")
     event.Skip()
 def OnButtonDeleteUnusedButton(self, event):
     unused_list = []
     for (i, poscov) in enumerate(model.instrument.inst.positions):
         if not display_thread.is_position_selected(poscov):
             unused_list.append(i)
     self.ask_to_delete_several(
         unused_list,
         "all sample orientations in the list are checked as being used.")
     event.Skip()
示例#3
0
    def cell_double_click(self, event):
        """Called when a cell is double-clicked by the user."""
        # @type event wx.grid.GridEvent
        #Find the positionCoverage object
        row = event.GetRow()
        poscov = model.instrument.inst.get_position_num(row)
        if poscov is None:
            return #Can't do anything is something is screwy here

        #Where did we click?
        col = event.GetCol()

        if col == 0:
            #Find what it is now
            was_selected = display_thread.is_position_selected(poscov)
            #Toggle the selection state
            display_thread.select_additional_position_coverage(poscov, update_gui=True, select_items=(not was_selected))
    def cell_double_click(self, event):
        """Called when a cell is double-clicked by the user."""
        # @type event wx.grid.GridEvent
        #Find the positionCoverage object
        row = event.GetRow()
        poscov = model.instrument.inst.get_position_num(row)
        if poscov is None:
            return  #Can't do anything is something is screwy here

        #Where did we click?
        col = event.GetCol()

        if col == 0:
            #Find what it is now
            was_selected = display_thread.is_position_selected(poscov)
            #Toggle the selection state
            display_thread.select_additional_position_coverage(
                poscov, update_gui=True, select_items=(not was_selected))