mirror of
https://github.com/gwdevhub/gMod.git
synced 2026-07-15 23:19:30 +00:00
BugFix:
- when loading a template, the layout function of the sizer is called, thus the new packages are also shown - Author and NoComment are also loaded from a language pack
This commit is contained in:
+4
-1
@@ -375,7 +375,10 @@ void OTM_Frame::OnMenuOpenTemplate(wxCommandEvent& WXUNUSED(event))
|
||||
|
||||
|
||||
//wxString file_name = wxFileSelector( Language->ChooseFile, page->GetOpenPath(), "", "*.*", "textures (*.dds)|*.dds|zip (*.zip)|*.zip|tpf (*.tpf)|*.tpf", wxFD_OPEN | wxFD_FILE_MUST_EXIST, this);
|
||||
wxString file_name = wxFileSelector( Language->ChooseFile, wxGetCwd(), "", "", "", wxFD_OPEN | wxFD_FILE_MUST_EXIST, this);
|
||||
|
||||
wxString dir = wxGetCwd();
|
||||
dir << "/templates";
|
||||
wxString file_name = wxFileSelector( Language->ChooseFile, dir, "", "*.txt", "text (*.txt)|*.txt", wxFD_OPEN | wxFD_FILE_MUST_EXIST, this);
|
||||
if ( !file_name.empty() )
|
||||
{
|
||||
if (page->LoadTemplate( file_name))
|
||||
|
||||
@@ -393,6 +393,9 @@ int OTM_GamePage::LoadTemplate( const wxString &file_name)
|
||||
}
|
||||
delete [] checked;
|
||||
NumberOfEntry = new_NumberOfEntry;
|
||||
|
||||
MainSizer->Layout();
|
||||
MainSizer->FitInside(this);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -246,6 +246,8 @@ int OTM_Language::LoadLanguage(const wxString &name)
|
||||
CheckEntry( command, msg, DeleteGame)
|
||||
CheckEntry( command, msg, GameAlreadyAdded)
|
||||
CheckEntry( command, msg, ExitGameAnyway)
|
||||
CheckEntry( command, msg, NoComment)
|
||||
CheckEntry( command, msg, Author)
|
||||
CheckEntry( command, msg, Error_FileNotSupported)
|
||||
CheckEntry( command, msg, Error_FktNotFound)
|
||||
CheckEntry( command, msg, Error_DLLNotFound)
|
||||
|
||||
Reference in New Issue
Block a user