On Mon, May 17, 2010 at 6:55 AM, Aleksey Chirkin <[email protected]> wrote:
> Hello!
>
> During the development of our application, we found behavior in WMenu
> that we are not satisfied.
>
> When the menu contains submenus, for example WtHome has a page
> "examples" which contains a submenu that switching of the main menu
> provokes reset the submenu to the first element.
> It is not always useful, because WStackedWidget exist precisely to
> preserve the status attached to their content, but in this case it is
> not supported.
>
> If I click on the tab Charts of page Examples, then an Introduction,
> and then again on the Examples, then I get on the first tab
> "HelloWorld". From the standpoint of compliance with the current url
> of the application state it is correct. And so we come up with a way
> out of this situation, which is the dynamic change of the path
> component the top level menu. But to do it is necessary to extend the
> method to internalPathChanged WMenu, and method setFromInternalPath
> WMenuItem. Method setFromInternalPath is virtual and does not
> constitute any problem of his extension. Unfortunately the method
> internalPathChanged in WMenu is private.
>
> Please consider making the method internalPathChanged virtual. Also
> see our patch WMenu and WMenuItem to better understand our idea and
> way to solve it.

That is just because of the way they have it set up.  WMenu works fine
for me and it keeps state just fine, but I have it save/restore the
path on change for the submenu's, works well, was simple to do, I see
not need for such changes.

Also, the internalPathChanged definitely does not need to be virtual,
it is already a callback, just reassign the callback if you want to
subclass (subclass'ing is not necessary in this instance anyway
though).

------------------------------------------------------------------------------

_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to