JAL-2360 fix incorrect action on Cancel user defined colour for group
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Wed, 21 Dec 2016 14:49:19 +0000 (14:49 +0000)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Wed, 21 Dec 2016 14:49:19 +0000 (14:49 +0000)
src/jalview/gui/UserDefinedColours.java

index bb2676c..cfc464e 100755 (executable)
@@ -939,10 +939,9 @@ public class UserDefinedColours extends GUserDefinedColours implements
   }
 
   /**
-   * DOCUMENT ME!
+   * On cancel, restores the colour scheme before the dialogue was opened
    * 
    * @param e
-   *          DOCUMENT ME!
    */
   @Override
   protected void cancelButton_actionPerformed(ActionEvent e)
@@ -955,9 +954,8 @@ public class UserDefinedColours extends GUserDefinedColours implements
       }
       else
       {
-        ap.av.setGlobalColourScheme(oldColourScheme);
+        ap.alignFrame.changeColour(oldColourScheme);
       }
-      ap.alignFrame.changeColour(oldColourScheme);
       ap.paintAlignment(true);
     }