public void storeUndoInfo() { if (app != null) { app.getKernel().getConstruction().getUndoManager() .storeUndoInfo(false); } } }
/** * Store both global and mode specific undo point. */ public void storeUndoInfoAndStateForModeStarting() { if (cons != null) { storeStateForModeStarting(); if (cons.isUndoEnabled()) { // reuse cons.getCurrentUndoXML(true) cons.getUndoManager().storeUndoInfo(stateForModeStarting, false); } } }
public void setPropertiesOccured() { getKernel().getConstruction().getUndoManager().setPropertiesOccured(); }
/** * Switch to cartesian coordinates */ public void cartesianCoordsCmd() { ArrayList<GeoElement> geos2 = checkOneGeo(); for (int i = geos2.size() - 1; i >= 0; i--) { GeoElement geo1 = geos2.get(i); if (geo1 instanceof CoordStyle) { CoordStyle point1 = (CoordStyle) geo1; point1.setMode(Kernel.COORD_CARTESIAN); geo1.updateRepaint(); } } app.getKernel().getConstruction().getUndoManager().storeUndoInfo(true); }
/** * Switch to 3D cartesian coordinates */ public void cartesianCoords3dCmd() { ArrayList<GeoElement> geos2 = checkOneGeo(); for (int i = geos2.size() - 1; i >= 0; i--) { GeoElement geo1 = geos2.get(i); if (geo1 instanceof CoordStyle) { CoordStyle point1 = (CoordStyle) geo1; point1.setMode(Kernel.COORD_CARTESIAN_3D); geo1.updateRepaint(); } } app.getKernel().getConstruction().getUndoManager().storeUndoInfo(true); }
/** * Switch to polar coordinates */ public void polarCoorsCmd() { ArrayList<GeoElement> geos2 = checkOneGeo(); for (int i = geos2.size() - 1; i >= 0; i--) { GeoElement geo1 = geos2.get(i); if (geo1 instanceof CoordStyle) { CoordStyle point1 = (CoordStyle) geo1; point1.setMode(Kernel.COORD_POLAR); geo1.updateRepaint(); } } app.getKernel().getConstruction().getUndoManager().storeUndoInfo(true); }
/** * Store undo point for properties change. */ public void storeUndoInfoForProperties() { getKernel().getConstruction().getUndoManager() .storeUndoInfoForProperties(isUndoActive()); }
/** * Switch to spherical coordinates */ public void sphericalCoordsCmd() { ArrayList<GeoElement> geos2 = checkOneGeo(); for (int i = geos2.size() - 1; i >= 0; i--) { GeoElement geo1 = geos2.get(i); if (geo1 instanceof CoordStyle) { CoordStyle point1 = (CoordStyle) geo1; point1.setMode(Kernel.COORD_SPHERICAL); geo1.updateRepaint(); } } app.getKernel().getConstruction().getUndoManager().storeUndoInfo(true); }
/** * Currently, we call this only if the pasted object is put down, but it * would be better if this were called every time when kernel.storeUndoInfo * called and there wasn't anything deleted * * @param app * application */ public void pastePutDownCallback(App app) { if (pasteFast(app)) { copyObject = app.getKernel().getConstruction().getUndoManager() .getCurrentUndoInfo(); copyObject2 = null; } } }
copiedXMLlabelsforSameWindow = new ArrayList<>(); copySource = app.getActiveEuclidianView(); copyObject = app.getKernel().getConstruction().getUndoManager() .getCurrentUndoInfo(); copiedMacros = new HashSet<>();
/** * Redo last action. */ public void redo() { if (undoActive && cons.getUndoManager().redoPossible()) { app.batchUpdateStart(); resetBeforeReload(); cons.redo(); restoreAfterReload(); app.batchUpdateEnd(); storeStateForModeStarting(); app.getEventDispatcher() .dispatchEvent(new Event(EventType.REDO, null)); app.setUnAutoSaved(); } }
private void shouldHaveUndoPointsAndColumns(int expected, int expectCols) { Assert.assertEquals(expected, getKernel().getConstruction() .getUndoManager().getHistorySize()); Assert.assertEquals(expectCols, model.getColumnCount()); }
if (cons.getUndoManager().undoPossible()) { app.batchUpdateStart(); resetBeforeReload();
copyObject2 = app.getKernel().getConstruction().getUndoManager() .getCurrentUndoInfo();
view.setPointCapturing(previousPointCapturing); changedKernel0 = true; app.getKernel().getConstruction().getUndoManager() .storeUndoInfoAfterPasteOrAdd();