ParticlePanel: fix Pmw error spam when hovering over File menu items

Fixes #552
This commit is contained in:
rdb 2019-03-04 14:23:11 +01:00
parent 4e92b708ff
commit 58df4064da

View File

@ -96,22 +96,21 @@ class ParticlePanel(AppShell):
## MENUBAR ENTRIES ## ## MENUBAR ENTRIES ##
# FILE MENU # FILE MENU
# Get a handle on the file menu so commands can be inserted # Get a handle on the file menu, and delete the Quit item that AppShell
# before quit item # created so we can add it back after adding the other items.
fileMenu = self.menuBar.component('File-menu') self.menuBar.deletemenuitems('File', 0, 0)
# MRM: Need to add load and save effects methods self.menuBar.addmenuitem('File', 'command',
fileMenu.insert_command(
fileMenu.index('Quit'),
label='Load Params', label='Load Params',
command=self.loadParticleEffectFromFile) command=self.loadParticleEffectFromFile)
fileMenu.insert_command( self.menuBar.addmenuitem('File', 'command',
fileMenu.index('Quit'),
label='Save Params', label='Save Params',
command=self.saveParticleEffectToFile) command=self.saveParticleEffectToFile)
fileMenu.insert_command( self.menuBar.addmenuitem('File', 'command',
fileMenu.index('Quit'),
label='Print Params', label='Print Params',
command=lambda s=self:s.particles.printParams()) command=lambda s=self:s.particles.printParams())
self.menuBar.addmenuitem('File', 'command', 'Quit this application',
label='Quit',
command=self.quit)
# PARTICLE MANAGER MENU # PARTICLE MANAGER MENU
self.menuBar.addmenu('ParticleMgr', 'ParticleMgr Operations') self.menuBar.addmenu('ParticleMgr', 'ParticleMgr Operations')