GNOME Bugzilla – Bug 529309
"Current sheet" after dialog range selection is messed up
Last modified: 2008-05-04 13:57:10 UTC
Please describe the problem: Each time I perform an ANOVA, I am left looking at a sheet with the results of that test. I can click on cells within that sheet, but when I try to enter information there, I actually end up editing the last cell selected BEFORE the test, usually in another sheet. If I go back to that previous sheet, and then back again to the sheet which contains the statistical results, then I can edit it. A minor annoying bug. Steps to reproduce: 1. Enter data intended for statistical analysis; 2. Make sure you select a cell within that sheet; 3. Run a statistical analysis (I used one-factor ANOVA), and choose to place the results in a different worksheet than the one with the data; 4. After placing the results there, select a cell and edit it. 5. After editing it, press enter. Actual results: At first it seems everything suggests the editing is being successful; as soon as one presses enter, though, we are brought back to the worksheet one was working in BEFORE the statistical test was performed, and the editing was made in that cell last selected before the test. Expected results: Gnumeric should let me edit the first cell I select after performing the statistical test, and forget the one I selected before the test was performed. Does this happen every time? Yes. Other information: Thank you so much for having added statistical tests to gnumeric. That is awesome!
Ah I can see this: one has to select a specific output range on a new sheet. Once one has performed the ANOVA one see the new sheet but the selection is on the old sheet (which isn't serious but really shouldn't be the case). More importantly, clicking in the new sheet does not move the selection. I am adjusting the component, since it definitely isn't a Charting problem, but I am not sure whether this is a specific problem with the analysis tests or whether it is more general.
THis is more widespread: If you use the goalseek tool and switch to another sheet to specify one of the cells, the same situation happens. Basically switching sheets to select cells in an expression entry can leave gnumeric in an inconsistent state. Note that this does not happen for the regular formula editing.
The key to this seems to be cb_notebook_switch_page. The patch below, which clearly is right for other situations, fixes the issue. Index: wbc-gtk.c =================================================================== --- wbc-gtk.c (revision 16548) +++ wbc-gtk.c (working copy) @@ -763,7 +763,7 @@ cb_direction_change (NULL, NULL, new_scg); - if (wbcg_rangesel_possible (wbcg)) { + if (0 && wbcg_rangesel_possible (wbcg)) { scg_take_focus (new_scg); return; }
Upping severity; Unpatched, I get piles of criticals from: 1. Tools->Goal Seek 2. Click Sheet2 3. Close dialog 4. Press 2
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.