GuiView::findOrBuild(): hide the dialog if requested and the dialog already exists.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26695 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2008-10-03 13:17:22 +00:00
parent ac55ec0f56
commit e29edccc3f

View File

@ -2248,8 +2248,11 @@ Dialog * GuiView::findOrBuild(string const & name, bool hide_it)
map<string, DialogPtr>::iterator it = d.dialogs_.find(name);
if (it != d.dialogs_.end())
if (it != d.dialogs_.end()) {
if (hide_it)
it->second->hideView();
return it->second.get();
}
Dialog * dialog = build(name);
d.dialogs_[name].reset(dialog);