Ignore:
Timestamp:
Jan 20, 2019, 9:32:16 PM (6 years ago)
Author:
chronos
Message:
  • Added: New menu action show/hide map grid lines.
  • Modified: Draw cell polygons without a gap so it can be drawn as solid surface without grid lines.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.pas

    r253 r268  
    1818
    1919  TFormMain = class(TForm)
     20    AMapGridVisible: TAction;
    2021    AStatusBarVisible: TAction;
    2122    AToolBarVisible: TAction;
     
    4748    MenuItem30: TMenuItem;
    4849    MenuItem32: TMenuItem;
     50    MenuItem33: TMenuItem;
    4951    MenuItemDebug: TMenuItem;
    5052    MenuItem31: TMenuItem;
     
    7072    ToolButton5: TToolButton;
    7173    ToolButton9: TToolButton;
     74    procedure AMapGridVisibleExecute(Sender: TObject);
    7275    procedure AStatusBarVisibleExecute(Sender: TObject);
    7376    procedure AToolBarBigIconsExecute(Sender: TObject);
     
    178181end;
    179182
     183procedure TFormMain.AMapGridVisibleExecute(Sender: TObject);
     184begin
     185  AMapGridVisible.Checked := not AMapGridVisible.Checked;
     186  UpdateClientForms;
     187end;
     188
    180189procedure TFormMain.AToolBarBigIconsExecute(Sender: TObject);
    181190begin
     
    211220  Core.PersistentForm.Save(Self);
    212221  SaveConfig(Core.XMLConfig1, 'FormMain');
     222  Core.ShowCellGrid := AMapGridVisible.Checked;
    213223  Core.Done;
    214224end;
     
    234244  FormClient.AStatusBarVisible.Checked := AStatusBarVisible.Checked;
    235245  FormClient.AStatusBarVisible.Update;
     246  Core.ShowCellGrid := AMapGridVisible.Checked;
     247  if Assigned(FormClient.Client) then
     248    FormClient.Client.ShowCellGrid := Core.ShowCellGrid;
     249  FormClient.Redraw;
    236250  for I := 0 to Core.FormClients.Count - 1 do begin
    237251    Core.FormClients[I].AToolBarBigIcons.Checked := AToolBarBigIcons.Checked;
     
    241255    Core.FormClients[I].AStatusBarVisible.Checked := AStatusBarVisible.Checked;
    242256    Core.FormClients[I].AStatusBarVisible.Update;
     257    if Assigned(Core.FormClients[I].Client) then
     258      Core.FormClients[I].Client.ShowCellGrid := Core.ShowCellGrid;
     259    Core.FormClients[I].Redraw;
    243260  end;
    244261end;
     
    248265  if not FormShown then begin
    249266    Core.LoadConfig;
     267    AMapGridVisible.Checked := Core.ShowCellGrid;
    250268    Core.ScaleDPI;
    251269    Core.PersistentForm.Load(Self, True);
Note: See TracChangeset for help on using the changeset viewer.