Community
Participate
Working Groups
Comes from the Papyrus bug bug 355880, but I can reproduce this bug using only EMF-Facet Nattable (as described below). The table take the focus after each refresh. I think this problem comes from the method NatTableWidget.setInput() because this method finishs with this.natTable.setFocus(); If I comment this last step I don't have the problem. Step to reproduce : 1/ Create a new Ecore model 2/ Edit an element of this model in a TableEditor 3/Share your screen between the Ecore Editor and the TableEditor 4/ Modify your model in the Ecore Editor (add an element, or rename an element in the property view -> The table is refreshed (OK) and take the focus, whenever it shouldn't. + As noticed in the bug 355880, the table is refresh even if an element which is not in the table is modified.
Fixed in revision 957 in trunk and revision 958 in branch 0_1. I have modified the setInput method of NatTableWidget so that the table control only retakes focus if it had it before the table was "refreshed" (i.e. recreated) or the first time it is created.
Note: I have found the setFocus() call is useful when manipulating the table using the keyboard : - hit F2 on an editable cell - modify the contents - hit Enter - move to another cell using the arrow keys Without the call to setFocus() in setInput(), this last step does not work because the table control has lost focus when it was destroyed and then recreated.
(In reply to comment #2) > Without the call to setFocus() in setInput(), this last step does not work > because the table control has lost focus when it was destroyed and then > recreated. Then, this be can't be considered has fixed.
(In reply to comment #3) > (In reply to comment #2) > > Without the call to setFocus() in setInput(), this last step does not work > > because the table control has lost focus when it was destroyed and then > > recreated. > > Then, this be can't be considered has fixed. Ok, so after an off line explanation this is not a regression.
Hello Vincent, Please, can you close this bug, if your problem has been solved ? Regards, Grégoire
This bug can be marked as closed fixed.