When right-clicking on a sheet in Calc and selecting Delete Sheet the currently-viewed sheet is deleted, not the sheet that was right-clicked on.
Not reproducible for me. If I right click on a unselected sheet, the sheet clicked become selected.
Perhaps this is an issue with the fact that my locale is set to Hebrew, as when the sheet is deleted I do see that the selected sheet "jumps" to the clicked sheet and back, and then the sheet indicator switches sides.
I am sorry that I do not have an LTR environment to triage in. Try this:
0) Set Calc as RTL by default: UI: English, Locale: Hebrew, Default
languages for documents: Western: English, CTL: Hebrew
1) Open Calc (Note that the default directionality is RTL)
2) Change sheet to LTR: Format -> Sheet -> Uncheck RTL
3) Delete another sheet by right-clicking the sheet's tab and selecting Delete Sheet
Reproducible with 3.6.3, adding to bug 43808 (rtl-meta).
1. Create spreadsheet with two sheets, one LTR and one RTL.
2. Try to delete the other sheet.
3. Notice the deleted sheet is the current one (easily noticable due to the different sheet directionality).
The bugs only occurs when the two sheet have opposite directionality. This happens regard less to the UI language/directionality.
Created attachment 69864 [details]
testdoc with two sheets
Seems like the bug only happens when all the sheets are blank, can anyone confirm this?
Can't confirm this. I took the testdoc above, put some values in a few cells are followed the instruction in comment 3. I could reproduce the problem.
Move from mab4.0 to mab3.6 at Michael's request (see https://bugs.freedesktop.org/show_bug.cgi?id=54157#c126)
Annoyingly I couldn't reproduce this in 22.214.171.124 - which is odd - either with or without data in the sheet (just loading Lior's nice test doc); though clearly there is quite some fun in the UI as/when it switches sheet.
Reproducible with 126.96.36.199, but not with 188.8.131.52.
Would be great to know which commit "accidentally" fixed this, guessing something that changed the focus when right clicking on a tab.
Verified on a build from master (4.1 branch point).