DK11 for Delphi | GisLayerVector.TGIS_LayerVector.Revert | Constructors | Fields | Methods | Properties | Events
Reverts a shape to its original state.
// Delphi public procedure Revert( const _uid : TGIS_Uid ); virtual;
// C++ Builder public: virtual void Revert( TGIS_Uid* const _uid );
Name | Type | Description |
---|---|---|
_uid | TGIS_Uid | Uid of a shape to be reverted |
Use this method to revert a shape indicated by Uid to its file based original state. If shape is not saved, it will be deleted. See MakeEditable.
Here is a simple procedure to revert a shape.
procedure MyClass.RevertShape(); var ll : TGIS_LayerVector ; tmp : TGIS_Shape ; begin if GIS.Items.Count=0 then exit; // get first layer ll := TGIS_LayerVector (GIS.Items[0]) ; tmp := ll.FindFirst(GisWholeWorld,'NAME=ABC'); // if first found, get original state if assigned( tmp ) then ll.Revert(tmp.Uid); GIS.Update; end;