@@ -70,11 +70,14 @@ void LogitMixedBranch::AddProfile(const wxString &p_text)
7070
7171 wxStringTokenizer tok (p_text, wxT (" ," ));
7272
73- m_lambdas.push_back (
74- (double )lexical_cast<Rational>(std::string ((const char *)tok.GetNextToken ().mb_str ())));
73+ const auto next = tok.GetNextToken ();
74+ if (next == " NE" ) {
75+ return ;
76+ }
77+ m_lambdas.push_back (std::stod (next.ToStdString ()));
7578
7679 for (size_t i = 1 ; i <= profile->MixedProfileLength (); i++) {
77- (*profile)[i] = lexical_cast<Rational>( std::string (( const char *) tok.GetNextToken ().mb_str () ));
80+ (*profile)[i] = std::stod ( tok.GetNextToken ().ToStdString ( ));
7881 }
7982
8083 m_profiles.push_back (profile);
@@ -111,7 +114,8 @@ class LogitMixedSheet final : public wxSheet {
111114
112115LogitMixedSheet::LogitMixedSheet (wxWindow *p_parent, GameDocument *p_doc,
113116 LogitMixedBranch &p_branch)
114- : wxSheet(p_parent, wxID_ANY), m_doc(p_doc), m_branch(p_branch)
117+ : wxSheet(p_parent, wxID_ANY, wxDefaultPosition, wxSize(800 , 600 )), m_doc(p_doc),
118+ m_branch (p_branch)
115119{
116120 CreateGrid (p_branch.NumPoints (), p_doc->GetGame ()->MixedProfileLength () + 1 );
117121 SetRowLabelWidth (40 );
@@ -224,7 +228,7 @@ LogitBranchDialog::LogitBranchDialog(wxWindow *p_parent, GameDocument *p_doc,
224228 m_sheet->AutoSizeCol (0 );
225229
226230 auto *sizer = new wxBoxSizer (wxVERTICAL);
227- sizer->Add (m_sheet, 0 , wxALL, 5 );
231+ sizer->Add (m_sheet, 0 , wxEXPAND | wxALL, 5 );
228232 sizer->Add (CreateButtonSizer (wxOK), 0 , wxALL | wxEXPAND, 5 );
229233
230234 SetSizer (sizer);
0 commit comments