{
calculateMenu.remove(calculateMenu.getItemCount()-2);
}
- setShowProductsEnabled();
}
-
+ /**
+ * set up menus for the currently viewport.
+ * This may be called after any operation that affects the data in the current view (selection changed, etc) to update the menus to reflect the new state.
+ */
+ public void setMenusForViewport()
+ {
+ setMenusFromViewport(viewport);
+ }
/**
* Need to call this method when tabs are selected for multiple views,
* or when loading from Jalview2XML.java
hiddenMarkers.setState(av.showHiddenMarkers);
applyToAllGroups.setState(av.colourAppliesToAllGroups);
+ setShowProductsEnabled();
+
updateEditMenuBar();
}
progressBars.put(new Long(id), progressPanel);
}
-
+ // update GUI
+ setMenusForViewport();
validate();
}
/**
public void actionPerformed(ActionEvent e)
{
- new jalview.ws.DBRefFetcher(
- alignPanel.av.getSequenceSelection(),
- alignPanel.alignFrame).fetchDBRefs(false);
+ javax.swing.SwingUtilities.invokeLater(new Runnable() {
+
+ public void run()
+ {
+ new jalview.ws.DBRefFetcher(
+ alignPanel.av.getSequenceSelection(),
+ alignPanel.alignFrame).fetchDBRefs(false);
+ }
+
+ });
}
});
public void actionPerformed(ActionEvent e)
{
// TODO: new thread for this call with vis-delay
- af.showProductsFor(sel, ds, isRegSel, dna, source);
+ af.showProductsFor(af.viewport.getSequenceSelection(), ds, isRegSel, dna, source);
}
});