Revision 9392 trunk/applications/appgvSIG/src/com/iver/cit/gvsig/LayoutUndoExtension.java
LayoutUndoExtension.java | ||
---|---|---|
42 | 42 |
|
43 | 43 |
import com.iver.andami.PluginServices; |
44 | 44 |
import com.iver.andami.plugins.Extension; |
45 |
import com.iver.cit.gvsig.gui.layout.Layout;
|
|
45 |
import com.iver.cit.gvsig.project.documents.layout.gui.Layout;
|
|
46 | 46 |
|
47 | 47 |
public class LayoutUndoExtension extends Extension{ |
48 | 48 |
|
... | ... | |
53 | 53 |
public void execute(String actionCommand) { |
54 | 54 |
Layout layout=(Layout)PluginServices.getMDIManager().getActiveWindow(); |
55 | 55 |
if (actionCommand.equals("UNDO")){ |
56 |
layout.getEFS().undo(); |
|
57 |
layout.updateFFrames(); |
|
58 |
layout.refresh(); |
|
56 |
layout.getLayoutContext().getEFS().undo();
|
|
57 |
layout.getLayoutContext().updateFFrames();
|
|
58 |
layout.getLayoutControl().refresh();
|
|
59 | 59 |
} |
60 | 60 |
} |
61 | 61 |
|
62 | 62 |
public boolean isEnabled() { |
63 | 63 |
if (PluginServices.getMDIManager().getActiveWindow() instanceof Layout){ |
64 | 64 |
Layout layout=(Layout)PluginServices.getMDIManager().getActiveWindow(); |
65 |
if (layout.getEFS().moreUndoCommands() && layout.isEditable())
|
|
65 |
if (layout.getLayoutContext().getEFS().moreUndoCommands() && layout.getLayoutContext().isEditable())
|
|
66 | 66 |
return true; |
67 | 67 |
} |
68 | 68 |
return false; |
Also available in: Unified diff