Jean-Marc Lasgouttes wrote: >>>>>> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: > > Angus> Jean-Marc Lasgouttes wrote: >>> It cures the crash, but there is still a problem: template popup >>> shows an empty entry, but the help text is the chess one. >>> >>> We have to find out why the popup is not initialized correctly, >>> instead of trying to workaround bad values. > > Angus> Sure. I thought you wanted to try it out... > > So, it appears that when I enter QExternal::update_contents(), > params.templatename() is empty. Where is it supposed to get a > reasonable value when creating an inset? I guess it should default > to the first one, or something.
It should do so. That it doesn't means you've uncovered a bug. My mental picture of the way forward is to disable the choice of template until the user attempts to select a file (either types it in or uses "Browse..."). Thereafter, we'd activate the chooser but use a 'best guess' algorithm to try and deduce the template type from the file name. We'll get this wrong sometimes, so allow the user to still set the chooser explicitly. Since the templates often have a list of recognized file extensions, we could use that to deduce the template type. Wa'd'ya think? -- Angus