LazMapViewer: Create the MapView's EditMark in a separate virtual method, CreateEditMark. Issue #39114
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9673 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
e8c36f1bc2
commit
6dcc628ea3
@ -676,6 +676,7 @@ type
|
||||
function CreateLayers: TMapLayers; virtual;
|
||||
procedure UpdateLayers;
|
||||
|
||||
function CreateEditMark: TMapEditMark; virtual;
|
||||
procedure CreateEditor;
|
||||
|
||||
function EditingEnabled: Boolean; inline;
|
||||
@ -4089,12 +4090,17 @@ begin
|
||||
FLayers[I].ComboLayer.TileLayer.ParentViewChanged;
|
||||
end;
|
||||
|
||||
function TMapView.CreateEditMark: TMapEditMark;
|
||||
begin
|
||||
Result := TMapEditMark.Create(self);
|
||||
end;
|
||||
|
||||
procedure TMapView.CreateEditor;
|
||||
begin
|
||||
if Assigned(FEditMark) then
|
||||
Exit;
|
||||
|
||||
FEditMark := TMapEditMark.Create(Self);
|
||||
FEditMark := CreateEditMark;
|
||||
FEditMark.UpdateFrom(Nil);
|
||||
FGPSItems[High(FGPSItems)].Add(FEditMark, _MAPEDITOR_ID_, MaxInt);
|
||||
FEditMark.Visible := True;
|
||||
|
@ -295,8 +295,8 @@ var
|
||||
msg: String;
|
||||
begin
|
||||
msg := Format(
|
||||
'Click OK to really add the new %0:s.' + LineEnding +
|
||||
'Click Cancel to discard the new %0:s.', [
|
||||
'Click on "OK" to add the new %s.' + LineEnding +
|
||||
'Click on "Cancel" to discard it.', [
|
||||
TRACK_AREA[FEditMode = pemAddArea]
|
||||
]);
|
||||
if MessageDlg(msg, mtConfirmation, [mbOK, mbCancel], 0) = mrOK then
|
||||
|
Loading…
Reference in New Issue
Block a user