* time.
*/
private boolean loadingFromArchive = false;
+
+ /**
+ * second flag to indicate if the jmol viewer should ignore sequence colouring
+ * events from the structure manager because the GUI is still setting up
+ */
+ private boolean loadingFinished = true;
/**
* state flag used to check if the Jmol viewer's paint method can be called
public void colourBySequence(boolean showFeatures,
jalview.api.AlignmentViewPanel alignmentv)
{
- if (!colourBySequence)
+ if (!colourBySequence || !loadingFinished)
return;
if (ssm == null)
{
{
this.loadingFromArchive = loadingFromArchive;
}
-
+
+ /**
+ *
+ * @return true if Jmol is still restoring state or loading is still going on (see setFinsihedLoadingFromArchive)
+ */
public boolean isLoadingFromArchive()
{
- return loadingFromArchive;
+ return loadingFromArchive && !loadingFinished;
+ }
+
+ /**
+ * modify flag which controls if sequence colouring events are honoured by the binding.
+ * Should be true for normal operation
+ * @param finishedLoading
+ */
+ public void setFinishedLoadingFromArchive(boolean finishedLoading)
+ {
+ loadingFinished = finishedLoading;
}
public void setBackgroundColour(java.awt.Color col)