anupmishra20 / opendatakit

Automatically exported from code.google.com/p/opendatakit
0 stars 0 forks source link

Multiple refreshes of SD card dialog causes selection glitch #664

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
If you refresh multiple times, the dialog keeps adding visual elements into 
radio panel. It also keeps adding multiple radio buttons to the group. This 
leads to a situation where you have your selected choice hidden underneath a 
bunch of empty radio buttons.

In rebuildPanel() you need to clear the radioPanel and clear out the radio 
group.

  private void rebuildPanel() {
    JPanel panel = radioPanel;
    radioPanel.removeAll();

....

    int len = 0;
    File oldDevice = odkDevice;
    JRadioButton activeButton = null;
    odkDevice = null;
    boolean first = true;

    if (radioGroup != null) {
        for (AbstractButton rb :  Collections.list(radioGroup.getElements())) {
            radioGroup.remove(rb);
        }
    }

Original issue reported on code.google.com by yano...@nafundi.com on 15 Aug 2012 at 4:13

GoogleCodeExporter commented 9 years ago
Fix will be in the next release of briefcase.

Undergrads...

Original comment by mitchellsundt@gmail.com on 15 Aug 2012 at 6:18