@Override
  public void trackListActionPerformed(ActionEvent arg0) {
    if (MainFrame.getInstance().isLocked()) {
      return;
    }

    final Track selectedTrack = getTrackListPanel().getSelectedTrack();
    if (selectedTrack != null) {
      VariantLayerDisplaySettings data = AddOrEditVariantLayerDialog.showAddDialog(getRootPane());
      if (data != null) {
        MGDisplaySettings settings = MGDisplaySettings.getInstance();
        VariantLayer newLayer = new VariantLayer(selectedTrack);
        newLayer.setData(data);
        selectedTrack.getLayers().add(newLayer);
        selectedTrack.setActiveLayer(newLayer);
        // Updates track (filters, display)
        MGARefresh action = new MGARefresh();
        action.setPreviousFilterList(settings.getFilterSettings().getAllMGFilters());
        action.actionPerformed(null);
      }
    }
  }
 /** Initializes the variant opacity */
 protected void initializeStripesOpacity() {
   variantOpacity =
       MGDisplaySettings.getInstance()
           .getVariousSettings()
           .getColorOpacity(); // gets the opacity for the stripes
 }