Changeset 273 for trunk/Forms/UFormMain.pas
- Timestamp:
- Jan 30, 2019, 8:08:44 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormMain.pas
r268 r273 18 18 19 19 TFormMain = class(TForm) 20 AUnitShapeVisible: TAction; 20 21 AMapGridVisible: TAction; 21 22 AStatusBarVisible: TAction; … … 49 50 MenuItem32: TMenuItem; 50 51 MenuItem33: TMenuItem; 52 MenuItem34: TMenuItem; 53 MenuItem35: TMenuItem; 51 54 MenuItemDebug: TMenuItem; 52 55 MenuItem31: TMenuItem; … … 76 79 procedure AToolBarBigIconsExecute(Sender: TObject); 77 80 procedure AToolBarVisibleExecute(Sender: TObject); 81 procedure AUnitShapeVisibleExecute(Sender: TObject); 78 82 procedure FormActivate(Sender: TObject); 79 83 procedure FormKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState); … … 201 205 end; 202 206 207 procedure TFormMain.AUnitShapeVisibleExecute(Sender: TObject); 208 begin 209 AUnitShapeVisible.Checked := not AUnitShapeVisible.Checked; 210 UpdateClientForms; 211 end; 212 203 213 procedure TFormMain.FormActivate(Sender: TObject); 204 214 begin … … 220 230 Core.PersistentForm.Save(Self); 221 231 SaveConfig(Core.XMLConfig1, 'FormMain'); 222 Core.ShowCellGrid := AMapGridVisible.Checked; 232 Core.CellGridVisible := AMapGridVisible.Checked; 233 Core.UnitShapeVisible := AUnitShapeVisible.Checked; 223 234 Core.Done; 224 235 end; … … 244 255 FormClient.AStatusBarVisible.Checked := AStatusBarVisible.Checked; 245 256 FormClient.AStatusBarVisible.Update; 246 Core.ShowCellGrid := AMapGridVisible.Checked; 247 if Assigned(FormClient.Client) then 248 FormClient.Client.ShowCellGrid := Core.ShowCellGrid; 257 Core.CellGridVisible := AMapGridVisible.Checked; 258 Core.UnitShapeVisible := AUnitShapeVisible.Checked; 259 if Assigned(FormClient.Client) then begin 260 FormClient.Client.CellGridVisible := Core.CellGridVisible; 261 FormClient.Client.UnitShapeVisible := Core.UnitShapeVisible; 262 end; 249 263 FormClient.Redraw; 250 264 for I := 0 to Core.FormClients.Count - 1 do begin … … 255 269 Core.FormClients[I].AStatusBarVisible.Checked := AStatusBarVisible.Checked; 256 270 Core.FormClients[I].AStatusBarVisible.Update; 257 if Assigned(Core.FormClients[I].Client) then 258 Core.FormClients[I].Client.ShowCellGrid := Core.ShowCellGrid; 271 if Assigned(Core.FormClients[I].Client) then begin 272 Core.FormClients[I].Client.CellGridVisible := Core.CellGridVisible; 273 Core.FormClients[I].Client.UnitShapeVisible := Core.UnitShapeVisible; 274 end; 259 275 Core.FormClients[I].Redraw; 260 276 end; … … 265 281 if not FormShown then begin 266 282 Core.LoadConfig; 267 AMapGridVisible.Checked := Core.ShowCellGrid; 283 AMapGridVisible.Checked := Core.CellGridVisible; 284 AUnitShapeVisible.Checked := Core.UnitShapeVisible; 268 285 Core.ScaleDPI; 269 286 Core.PersistentForm.Load(Self, True);
Note:
See TracChangeset
for help on using the changeset viewer.