Ignore:
Timestamp:
Jan 30, 2017 2:25:48 PM (5 years ago)
Author:
vondreele
Message:

prevent delete if PWDR if corresponding PDF exists
use PickElements? instead of PickElement? - allows multiple selection, blacks out ones already picked & can unpick a pick
add delete spots option to masks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIElemGUI.py

    r2668 r2674  
    2626class PickElement(wx.Dialog):
    2727    '''Makes periodic table widget for picking element. Modes:
    28         oneOnly if True element symbols are provided, otherwise select isotope
    29         ifNone ?
     28        oneOnly if True element symbols are provided, otherwise select valence
     29        ifNone if True show None button
    3030        ifMag if True present magnetic scatters only
    3131        multiple if True multiple elements can be selected
     
    7272    def ElButton(self, name, pos, tip, color):
    7373        'Creates an element button widget'
     74        self.color = color
    7475        if not self.ifNone and name[0] == 'None':
    7576            return
     
    105106        self.Elem = El
    106107        if self.multiple:
    107             self.elementList.append(El)
    108             event.GetEventObject().SetBackgroundColour('black') # Shows on Mac
     108            if El in self.elementList:
     109                self.elementList.remove(El)
     110                event.GetEventObject().SetBackgroundColour(self.color) # Shows on Mac
     111            else:
     112                self.elementList.append(El)
     113                event.GetEventObject().SetBackgroundColour('black') # Shows on Mac
    109114            event.GetEventObject().SetColour(
    110115                wx.Colour(*[int(i/2) for i in event.GetEventObject().GetColour()]))
Note: See TracChangeset for help on using the changeset viewer.