On Fri, 20 Oct 2000, Angus Leeming wrote:

> I think I may have got my knickers in a twist (good ol' English expression). 
> Apologies, but it is Friday; feel free to flame.

You can't be right all the time.

> 2. I'm trying to get my head round this and it's hurting! Has Jürgen done it 
> the right way and I've done it the wrong way? His way there's only one 

Juergen got it wrong.  That was done when everyone was running around
inventing their own ways to hide insets when all they had to do was look
at the original development branch and you would have found essentially
what you have now (which you did).  Juergen's code never got updated after
everyone saw the light.

> Incidentally, Jürgen, I don't think you need store a Dialogs * in the class 
> deinition of InsetTabular. You get it locally whenever you emit a signal. Eg
> 
>       dialogs_ = bv->owner()->getDialogs();
>       dialogs_->updateTabular(*this);

Or just skip the named variable and activate the signal outright.
 
> All, that is except for the one in InsetTabular::~InsetTabular():
> 
>       if (dialogs_)
>               dialogs_->hideTabular(*this);
> 
> Why not:
>       Dialogs dialogs_ = bv->owner()->getDialogs();
>       dialogs_->hideTabular(*this);
> 
> After all, the dialog will disconnect this signal when the popup closes. No 
> harm in emitting a signal with no connecting slot.

Get rid of HideTabular()!!!

and do it the right way.

Allan. (ARRae)

Reply via email to