From e473ecf7d567d12a18bc9ea24d6c8bdb53aeae07 Mon Sep 17 00:00:00 2001 From: mattias Date: Thu, 1 May 2008 17:15:13 +0000 Subject: [PATCH] IDE: remove empty methods: warning when caret not in a class git-svn-id: trunk@15026 - --- components/codetools/codecompletiontool.pas | 1 - ide/emptymethodsdlg.pas | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/components/codetools/codecompletiontool.pas b/components/codetools/codecompletiontool.pas index b3e348355d..c3002a3695 100644 --- a/components/codetools/codecompletiontool.pas +++ b/components/codetools/codecompletiontool.pas @@ -4042,7 +4042,6 @@ begin AVLNode:=ProcBodyNodes.FindSuccessor(AVLNode); end; end; - Result:=true; finally ProcBodyNodes.FreeAndClear; ProcBodyNodes.Free; diff --git a/ide/emptymethodsdlg.pas b/ide/emptymethodsdlg.pas index 2861f20e6c..52f9cab77a 100644 --- a/ide/emptymethodsdlg.pas +++ b/ide/emptymethodsdlg.pas @@ -114,6 +114,10 @@ begin if CodeToolBoss.ErrorMessage<>'' then begin ErrMsg:=''; LazarusIDE.DoJumpToCodeToolBossError; + end else begin + MessageDlg('No class', + 'No class at '+Code.Filename+'('+IntToStr(Caret.Y)+','+IntToStr(Caret.X)+')', + mtError,[mbCancel],0); end; exit; end;