On 18 Oct 2000, Lars Gullik Bjønnes wrote: > fname is a string so you should use: > > if (fname.empty()) > return; thanks. it is better to use empty() because it avoids the implicit srting("") ctor in the conversion right ? see applied john -- "Mathemeticians stand on each other's shoulders while computer scientists stand on each other's toes." - Richard Hamming
diff -u -r1.621 ChangeLog --- ChangeLog 2000/10/18 14:07:28 1.621 +++ ChangeLog 2000/10/18 18:19:26 @@ -1,0 +1,4 @@ +2000-10-18 John Levon <[EMAIL PROTECTED]> + + * src/lyxfunc.C: make New from template->Cancel work + diff -u -r1.156 lyxfunc.C --- src/lyxfunc.C 2000/10/18 12:00:53 1.156 +++ src/lyxfunc.C 2000/10/18 18:19:28 @@ -3182,8 +3182,10 @@ fname = fileDlg.Select(_("Choose template"), lyxrc.template_path, "*.lyx"); - templname = fname; AllowInput(owner->view()); + if (fname.empty()) + return; + templname = fname; } // find a free buffer