Changeset 4242

Show
Ignore:
Timestamp:
07/02/07 19:45:56 (6 years ago)
Author:
cdietric
Message:

add nodes and devices with double click, fixes ticket #263 (previous changeset fixed ticket #262)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • WaveDev/trunk/WaveDev/wavedev/MainFrame.py

    r4241 r4242  
    16071607 
    16081608    def OnResourceBoxLeftDoubleClick(self, event): 
    1609         self.OnResourceBoxPopupAddMenu(event) 
     1609        sn = self.resourceBox.GetSelection() 
     1610        if (sn != self.resourceBox.GetRootItem() and self.resourceBox.GetItemParent(sn) != self.resourceBox.GetRootItem()): 
     1611            # a child component (Component or Device) 
     1612            tmpRes =  self.resourceBox.GetPyData(sn) 
     1613            if tmpRes.type == 'resource': 
     1614                self.OnResourceBoxPopupAddMenu(event) 
     1615            elif tmpRes.type == 'node': 
     1616                self.OnResourceBoxPopupAddnodeMenu(event) 
     1617            elif (tmpRes.type == 'device' or tmpRes.type == 'loadabledevice' or tmpRes.type == 'executabledevice'): 
     1618                self.OnResourceBoxPopupAdddevMenu(event) 
    16101619 
    16111620    def OnResourceBoxPopupAdddevMenu(self, event):