Bug 160291

Summary: Sampling dialog should be able to run without closing the dialog
Product: LibreOffice Reporter: Rafael Lima <rafael.palma.lima>
Component: CalcAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: enhancement CC: heiko.tietze, stephane.guillou
Priority: medium    
Version: 24.8.0.0 alpha0+   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=161462
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 111310    

Description Rafael Lima 2024-03-21 00:48:53 UTC
Currently, to perform sampling (Data - Statistics - Sampling), the user needs to open the dialog, fill out all the options and then press OK. As soon as OK is pressed, the dialog closes.

The problem with this is that all options are lost. So if the user wants to perform a new "run" of the same settings, they need to reopen the dialog and fill in all the options again.

It would be better to have a checkbox in the dialog with something like "Close on OK". If this checkbox is unchecked, the dialog would remain open after OK is pressed, allowing the user to run the sampling again if needed.

This would be similar to "Run immediately" option from the "Paste special" dialog.
Comment 1 Stéphane Guillou (stragu) 2024-04-05 01:33:34 UTC
I agree that it's too cumbersome for several sampling events of the same sample to various sources.

What about a simple "Apply" button like in other dialogs? More consistent, and no need for an extra tick box. I think Paste Special's "Run immediately" only makes sense when there are preset buttons.

Heiko, do you agree?
Comment 2 Stéphane Guillou (stragu) 2024-04-05 01:34:13 UTC
(In reply to Stéphane Guillou (stragu) from comment #1)
> I agree that it's too cumbersome for several sampling events of the same
> sample to various sources.
various _targets_.
Comment 3 Heiko Tietze 2024-04-15 15:06:56 UTC
I am thinking about to remember the settings as we do in other dialogs too. This may, however, end in a situation where the result in $A1 is some sample and $B1 some other, and what you actual what to get is the setting on this result cell (plus the latest to apply it again). 

It's cheap and easyhackable to remember the last dialog's settings, but not what has been used in a particular cell.
Comment 4 Stéphane Guillou (stragu) 2024-04-17 02:17:41 UTC
(In reply to Heiko Tietze from comment #3)
> I am thinking about to remember the settings as we do in other dialogs too.
> This may, however, end in a situation where the result in $A1 is some sample
> and $B1 some other, and what you actual what to get is the setting on this
> result cell (plus the latest to apply it again). 
Not sure I understand this. Remembering the settings would be OK (although making sure we still use the current range selection to populate the "Input range" field, as currently), but I still think we need a simple Apply button so we don't have to repeatedly go into "Data > Statistics > Sampling" to do a handful of sampling events.

Rafael, what's you opinion?