2014-02-25 11:45 GMT+04:00 Koen Deforche <k...@emweb.be>:

> Hey Dmitriy,
>
> 2014-01-20 12:04 GMT+01:00 Dmitriy Igrishin <dmit...@gmail.com>:
>
>> Hey,
>>
>> 1. It would be nice to make WMenu::select(int, bool) protected since it's
>> useful when
>> overriding WMenu::internalPathChanged(const std::string&).
>>
>
> Good idea, and I did.
>
>
>> 2. Please note WMenu::handleInternalPathChange(const std::string&) which
>> looks as:
>>
>> void WMenu::handleInternalPathChange(const std::string& path)
>> {
>>   if (!parentItem_)
>>     internalPathChanged(path);
>> }
>>
>> should be rewritten to:
>>
>> void WMenu::handleInternalPathChange(const std::string& path)
>> {
>>   internalPathChanged(path);
>> }
>>
>
> Actually, I've changed it to:
>
> void WMenu::handleInternalPathChange(const std::string& path)
> {
>   if (!parentItem_ || !parentItem_->internalPathEnabled())
>     internalPathChanged(path);
> }
>
> The reason is that when submenus and parent menus together define an in
> internal path hierarchy, WMenuItem::setFromInternalPath() will propagate
> the internal path change to the corresponding submenu.
>
> This also makes your attached test case behave correctly.
>
> Excellent! thanks!


-- 
// Dmitriy.
------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to