Community
Participate
Working Groups
We are using multiple instances of commonNavigator. When I click on a tree item of a navigator which is currently unselect, my click doesn't select the item. It only selects the commonNavigator tab. This is happening only on Linux-GTK, Red Hat 6.4. On windows we are having expectied behavior i.e. clicking on an item of unselected commonNavigator selects both the commonNavigator tab and the tree item.
Please note that navigator selection on Eclipse IDE works fine on Linux.
I was able to click in the Project Explorer (Common Nav) and it both activated the tab and selected what I clicked on. But I guess that's what you mean by your last comment. Can you please attach an example project that demonstrates the problem? PW
This issue is only happening in our RCP application. Sorry didn't get a chance to post an example code. Will do that in couple of days.
I've been working with Joe to track this down. The problem turns out to be due to a CSS rule that causes a font-change on Tree and Table widgets hosted within an MPart. .MPart Tree, .MPart Table { font-family: Arial, Liberation Sans, sans-serif; font-size: 10px; } These CSS settings are re-applied on every part activation (as part of setting the "active" tag and propagating the change to CSS). Our CSSPropertyFontSWTHandler#setFont() doesn't check whether the widget's font is already set to the given font. On GTK, at least, setting the font causes some difference in selection. Changing setFont() to avoid setting the font unnecessarily avoids the issue: private static void setFont(Widget widget, Font font) { if (widget instanceof CTabItem) { if(((CTabItem) widget).getFont() != font) { ((CTabItem) widget).setFont(font); } } else if (widget instanceof Control) { if(((Control) widget).getFont() != font) { ((Control) widget).setFont(font); } } }
Thanks for fix. Released as: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=e58f1c7d25caff77c8f2028da69e2df87a9685c0 Daniel