diff --git a/GUI/SW1/SRC/BUNDLEBLDR.cpp b/GUI/SW1/SRC/BUNDLEBLDR.cpp index 952bb11..aeb94e9 100644 --- a/GUI/SW1/SRC/BUNDLEBLDR.cpp +++ b/GUI/SW1/SRC/BUNDLEBLDR.cpp @@ -293,6 +293,7 @@ BUNDLEBLDR::BUNDLEBLDR(wxWindow* parent,wxWindowID id,const wxPoint& pos,const w Panel2->Connect(wxEVT_PAINT,(wxObjectEventFunction)&BUNDLEBLDR::OnPanel2Paint,0,this); Connect(ID_CHECKBOX1,wxEVT_COMMAND_CHECKBOX_CLICKED,(wxObjectEventFunction)&BUNDLEBLDR::OnCheckBox1Click); + Connect(ID_CHECKBOX2,wxEVT_COMMAND_CHECKBOX_CLICKED,(wxObjectEventFunction)&BUNDLEBLDR::OnCheckBox2Click); Connect(ID_COMBOBOX1,wxEVT_COMMAND_COMBOBOX_SELECTED,(wxObjectEventFunction)&BUNDLEBLDR::OnComboBox1Selected); Connect(ID_CHECKBOX3,wxEVT_COMMAND_CHECKBOX_CLICKED,(wxObjectEventFunction)&BUNDLEBLDR::OnCheckBox3Click); Connect(ID_TEXTCTRL4,wxEVT_COMMAND_TEXT_UPDATED,(wxObjectEventFunction)&BUNDLEBLDR::OnTextCtrl4Text); @@ -407,24 +408,20 @@ BUNDLEBLDR::~BUNDLEBLDR() void BUNDLEBLDR::PopulateTheDirectoryTree (wxString Path) { + int size_h, size_v; - #ifdef debug - wxMessageBox(Path, _("PathToMod")); - #endif + tree = (wxSpecificDirCtrl *) NULL; - int size_h, size_v; Panel2->GetSize(&size_h, &size_v ); - //wxGenericDirCtrl *tree; - tree = (wxSpecificDirCtrl *) NULL; - tree = new wxSpecificDirCtrl (Panel2, -1, Path, - wxDefaultPosition, - wxSize(size_h, size_v), - wxSIMPLE_BORDER,//wxDIRCTRL_3D_INTERNAL|wxSUNKEN_BORDER, - "*.cable_spec", 0, - _T("Directory Listing")); - Connect(tree->GetTreeCtrl()->GetId(),wxEVT_COMMAND_TREE_ITEM_ACTIVATED, (wxObjectEventFunction) (wxEventFunction)(wxCommandEventFunction) &BUNDLEBLDR::OnTreeSelectionChanged); + tree = new wxSpecificDirCtrl (Panel2, -1, Path, + wxDefaultPosition, + wxSize(size_h, size_v), + wxSIMPLE_BORDER, + "*.cable_spec", 0, + _T("Directory Listing")); + Connect(tree->GetTreeCtrl()->GetId(),wxEVT_COMMAND_TREE_ITEM_ACTIVATED, (wxObjectEventFunction) (wxEventFunction)(wxCommandEventFunction) &BUNDLEBLDR::OnTreeSelectionChanged); //SetButtonState_FolderSelected(); } @@ -477,6 +474,7 @@ void BUNDLEBLDR::SetPathForDir(wxString Path, wxString Name) { PathToMOD << Path; MODname << Name; + PopulateTheDirectoryTree(PathToMOD); } @@ -1614,3 +1612,18 @@ void BUNDLEBLDR::OnSpinButton1ChangeDown(wxSpinEvent& event) DrawBundleCsection(); } + +void BUNDLEBLDR::OnCheckBox2Click(wxCommandEvent& event) +{ + if (CheckBox2->GetValue()) + { + TextCtrl8 -> Disable(); + SpinButton1 -> Disable(); + } + + if (!CheckBox2->GetValue()) + { + TextCtrl8 -> Enable(); + SpinButton1 -> Enable(); + } +} diff --git a/GUI/SW1/SRC/BUNDLEBLDR.h b/GUI/SW1/SRC/BUNDLEBLDR.h index 172d68e..a8140fe 100644 --- a/GUI/SW1/SRC/BUNDLEBLDR.h +++ b/GUI/SW1/SRC/BUNDLEBLDR.h @@ -264,6 +264,7 @@ class BUNDLEBLDR: public wxDialog void OnTextCtrl8TextEnter(wxCommandEvent& event); void OnSpinButton1ChangeUp(wxSpinEvent& event); void OnSpinButton1ChangeDown(wxSpinEvent& event); + void OnCheckBox2Click(wxCommandEvent& event); //*) void PopulateTheDirectoryTree ( wxString); diff --git a/GUI/SW1/SRC/SW1_GUIMain.cpp b/GUI/SW1/SRC/SW1_GUIMain.cpp index 1a624d3..e9c355a 100644 --- a/GUI/SW1/SRC/SW1_GUIMain.cpp +++ b/GUI/SW1/SRC/SW1_GUIMain.cpp @@ -265,7 +265,7 @@ void SW1_GUIFrame::OnSelectMOD(wxCommandEvent& event) wxString selectedFile = dirDialog->GetPath(); SelectedFile = dirDialog->GetPath(); - PathToMOD << dirDialog->GetPath(); + PathToMOD = dirDialog->GetPath(); // Show the selected folder in the status bar SetStatusText(SelectedFile, 0); diff --git a/GUI/SW1/SRC/UTILITIES.cpp b/GUI/SW1/SRC/UTILITIES.cpp index c8674d1..fedc6a2 100644 --- a/GUI/SW1/SRC/UTILITIES.cpp +++ b/GUI/SW1/SRC/UTILITIES.cpp @@ -72,7 +72,7 @@ void check_is_numeric(wxTextCtrl *TxtBox, int *IsError) TxtBox->Refresh(); } - if (*non_numeric || *IsError == 1) + if (!*non_numeric || *IsError == 1) { TxtBox->SetBackgroundColour(wxColor(255,153,153)); TxtBox->SetFocus(); diff --git a/GUI/SW1/SRC/resources/Build b/GUI/SW1/SRC/resources/Build index 6d66754..999055d 100644 --- a/GUI/SW1/SRC/resources/Build +++ b/GUI/SW1/SRC/resources/Build @@ -1,6 +1,6 @@ GUI: Version: 1.4.0 -Date: 13th August 2018 +Date: 14th August 2018 SPICE_CABLE_MODEL_BUILDER Version: v4.0.0 -- libgit2 0.21.2