public void restore() {
   if (macro != null && this.restoreMacro != null) {
     macro.restore(this.restoreMacro);
     if (macro.panel != null) {
       macro.panel.refreshComponents();
     }
   }
 }
 public MacroChangedUndoAction(Macro macro) {
   this.macro = macro;
   if (macro != null) {
     this.restoreMacro = macro.getUndoCopy();
   }
 }