[chimera-dev] chimera.widgets.ModelOptionMenu aggressiveness
Eric Pettersen
pett at cgl.ucsf.edu
Mon Mar 6 14:12:01 PST 2006
Hi Charlie,
Chimera does force dialogs to unmap as an image is saved in order to
give it the best chance of not having the graphics window obscured as
the image is saved. We would like to move to a technology where
image saving isn't directly tied to the visibility of the graphics
window, but for now this is what we have.
So your extension is doing something when the dialog unmaps that
affects the displayed image? Are you sure you want to do it there
rather than overriding the dialog's Cancel method (which will be
called if the dialog is Closed or the window's 'X' button is
clicked)? If you override Cancel, you need to make sure to call
ModelessDialog.Cancel(self) in the overriding method.
Another option is to respond to Chimera's 'unmapped' and 'mapped'
triggers (which occur as Chimera forces child dialogs to unmap/map)
to avoid changing the display for this kind of temporary dialog
hiding. If you wrote a handler function like this:
def myUnmap(self, *args):
... do something in response to temporary unmap...
you would register the trigger handler with:
chimera.triggers.addHandler('unmapped', myUnmap, None)
Triggers and handlers are described here: http://www.cgl.ucsf.edu/
chimera/docs/ProgrammersGuide/Examples/Main_AtomTrigger.html
Let me know if you need more info.
--Eric
On Mar 6, 2006, at 1:19 PM, Charlie Moad wrote:
> I am using chimera.widgets.ModelOptionMenu in my plugin as
> suggested, but when I attempt to save a screen image its as if my
> plugin/the structure is being unmapped then mapped again. The tiles
> are rendered before my plugin reloads the interface. Is there a way I
> can programmatically destroy my plugin's instance so I can at least
> take a screenshot without anything changing? I poked around
> chimera.extension.manager without success.
>
> Thanks,
> Charlie
>
> _______________________________________________
> Chimera-dev mailing list
> Chimera-dev at cgl.ucsf.edu
> http://www.cgl.ucsf.edu/mailman/listinfo/chimera-dev
More information about the Chimera-dev
mailing list