From e5fdfc382c40a5ab3db6495bc179ae6e176ae8ed Mon Sep 17 00:00:00 2001 From: inoussa Date: Thu, 20 Oct 2016 11:54:13 +0000 Subject: [PATCH] Main Windows: allow the "Save" action to also work for XSD files. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5274 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- wst/trunk/type_lib_edtr/uwsttypelibraryedit.lfm | 2 +- wst/trunk/type_lib_edtr/uwsttypelibraryedit.pas | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/wst/trunk/type_lib_edtr/uwsttypelibraryedit.lfm b/wst/trunk/type_lib_edtr/uwsttypelibraryedit.lfm index 4800feccf..98980e86a 100644 --- a/wst/trunk/type_lib_edtr/uwsttypelibraryedit.lfm +++ b/wst/trunk/type_lib_edtr/uwsttypelibraryedit.lfm @@ -12,7 +12,7 @@ object fWstTypeLibraryEdit: TfWstTypeLibraryEdit OnDropFiles = FormDropFiles OnShow = FormShow Position = poDesktopCenter - LCLVersion = '1.4.1.0' + LCLVersion = '1.6.1.0' object SB: TStatusBar Left = 0 Height = 20 diff --git a/wst/trunk/type_lib_edtr/uwsttypelibraryedit.pas b/wst/trunk/type_lib_edtr/uwsttypelibraryedit.pas index 7ecfe28c4..6ec5f3574 100644 --- a/wst/trunk/type_lib_edtr/uwsttypelibraryedit.pas +++ b/wst/trunk/type_lib_edtr/uwsttypelibraryedit.pas @@ -668,13 +668,15 @@ end; procedure TfWstTypeLibraryEdit.actSaveXSDExecute(Sender : TObject); var - oldFilter : string; + oldFilter, locFileName : string; begin oldFilter := SD.Filter; SD.Filter := 'XSD files ( *.xsd )|*.xsd'; try if SD.Execute() then begin - SaveToFile(ChangeFileExt(SD.FileName,'.xsd')); + locFileName := ChangeFileExt(SD.FileName,'.xsd'); + SaveToFile(locFileName); + FCurrentFileName := locFileName; end; finally SD.Filter := oldFilter;