diff --git a/Source/ide/codetools/simba.ide_codetools_parser.pas b/Source/ide/codetools/simba.ide_codetools_parser.pas index e6e5d2f64..617391691 100644 --- a/Source/ide/codetools/simba.ide_codetools_parser.pas +++ b/Source/ide/codetools/simba.ide_codetools_parser.pas @@ -1305,15 +1305,17 @@ function TDeclaration_Method.GetParamCount: Integer; function TDeclaration_Method.GetParams: TDeclarationArray; var Decl: TDeclaration; + Decls: TDeclarationArray; begin if FParams.IsNull then begin - FParams := []; - + Decls := []; Decl := Items.GetByClassFirst(TDeclaration_ParamList); if (Decl <> nil) then for Decl in Decl.Items.GetByClass(TDeclaration_ParamGroup) do - FParams.Value.Add(Decl.Items.GetByClass(TDeclaration_Parameter)); + Decls.Add(Decl.Items.GetByClass(TDeclaration_Parameter)); + + FParams := Decls; end; Result := FParams; diff --git a/Source/ide/simba.form_main.lfm b/Source/ide/simba.form_main.lfm index f985f0b50..753e4cfea 100644 --- a/Source/ide/simba.form_main.lfm +++ b/Source/ide/simba.form_main.lfm @@ -11,7 +11,7 @@ object SimbaMainForm: TSimbaMainForm OnDestroy = FormDestroy OnWindowStateChange = FormWindowStateChange Position = poScreenCenter - LCLVersion = '3.4.0.0' + LCLVersion = '3.6.0.0' object DockPanel: TAnchorDockPanel AnchorSideLeft.Side = asrBottom AnchorSideTop.Side = asrBottom @@ -320,7 +320,7 @@ object SimbaMainForm: TSimbaMainForm end object MenuItemRunLast: TMenuItem Caption = 'Run Last Script' - ShortCut = 41042 + ShortCut = 32849 Visible = False OnClick = MenuItemRunLastClick end diff --git a/Source/ide/simba.form_tabs.lfm b/Source/ide/simba.form_tabs.lfm index 449cd90ff..956c6285d 100644 --- a/Source/ide/simba.form_tabs.lfm +++ b/Source/ide/simba.form_tabs.lfm @@ -15,7 +15,7 @@ object SimbaTabsForm: TSimbaTabsForm OnMouseMove = FormMouseMove OnMouseUp = FormMouseUp ShowInTaskBar = stAlways - LCLVersion = '3.0.0.3' + LCLVersion = '3.6.0.0' object FindPanel: TPanel Left = 0 Height = 0 @@ -76,7 +76,11 @@ object SimbaTabsForm: TSimbaTabsForm OnClick = DoTabPopupClick end object MenuItemCloseOtherTabs: TMenuItem - Caption = 'Close All Other Tabs' + Caption = 'Close All Other' + OnClick = DoTabPopupClick + end + object MenuItemCloseTabsOnRight: TMenuItem + Caption = 'Close All On Right' OnClick = DoTabPopupClick end end diff --git a/Source/ide/simba.form_tabs.pas b/Source/ide/simba.form_tabs.pas index 046fc9712..3b8a554e5 100644 --- a/Source/ide/simba.form_tabs.pas +++ b/Source/ide/simba.form_tabs.pas @@ -16,6 +16,7 @@ interface type TSimbaTabsForm = class(TForm) + MenuItemCloseTabsOnRight: TMenuItem; OpenDialog: TOpenDialog; MenuItemNewTab: TMenuItem; MenuItemCloseTab: TMenuItem; @@ -93,6 +94,7 @@ TSimbaTabsForm = class(TForm) function CloseTab(Tab: TSimbaScriptTab; KeepOne: Boolean): Boolean; function CloseOtherTabs(Tab: TSimbaScriptTab): Boolean; + function CloseTabsOnRight(Tab: TSimbaScriptTab): Boolean; function CloseAllTabs: Boolean; function Open(FileName: String; CheckOtherTabs: Boolean = True): Boolean; overload; @@ -147,8 +149,9 @@ procedure TSimbaTabsForm.DoTabPopupClick(Sender: TObject); if Assigned(Tab) then begin - if (Sender = MenuItemCloseTab) then CloseTab(Tab, True); - if (Sender = MenuItemCloseOtherTabs) then CloseOtherTabs(Tab); + if (Sender = MenuItemCloseTab) then CloseTab(Tab, True); + if (Sender = MenuItemCloseOtherTabs) then CloseOtherTabs(Tab); + if (Sender = MenuItemCloseTabsOnRight) then CloseTabsOnRight(Tab); end; end; end; @@ -536,6 +539,25 @@ function TSimbaTabsForm.CloseOtherTabs(Tab: TSimbaScriptTab): Boolean; end; end; +function TSimbaTabsForm.CloseTabsOnRight(Tab: TSimbaScriptTab): Boolean; +var + I: Integer; +begin + Result := True; + + for I := TabCount - 1 downto 0 do + begin + if (Tabs[I] = Tab) then + Exit; + + if (not CloseTab(Tabs[I], True)) then + begin + Result := False; + Exit; + end; + end; +end; + function TSimbaTabsForm.CloseAllTabs: Boolean; var I: Integer; diff --git a/Source/ide/simba.ide_editor_autocomplete.pas b/Source/ide/simba.ide_editor_autocomplete.pas index b9962d4d0..ed9254534 100644 --- a/Source/ide/simba.ide_editor_autocomplete.pas +++ b/Source/ide/simba.ide_editor_autocomplete.pas @@ -38,8 +38,6 @@ TSimbaAutoComplete_Hint = class(TSynCompletionHint) function UseFGThemes: Boolean; override; procedure Paint; override; public - constructor Create(AOwner: TComponent); override; - function CalcHintRect: TRect; override; end; @@ -124,15 +122,6 @@ procedure TSimbaAutoComplete_Hint.Paint; end; end; -constructor TSimbaAutoComplete_Hint.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - - {$IFDEF WINDOWS} - SetClassLong(Handle); // Clear CS_DROPSHADOW - {$ENDIF} -end; - function TSimbaAutoComplete_Hint.UseBGThemes: Boolean; begin Result := False; @@ -764,8 +753,10 @@ constructor TSimbaAutoComplete.Create(AOwner: TComponent); begin inherited Create(AOwner); + // On Windows remove shadows CS_DROPSHADOW {$IFDEF WINDOWS} - SetClassLong(Form.Handle); // Clear CS_DROPSHADOW + SetClassLong(Form.Handle); + SetClassLong(Form.Hint.Handle); {$ENDIF} Form.SizeDrag.OnPaint := @DoPaintSizeDrag;