Commit 2f8cca9d6984c1559405a3dba709b56176c0b2f8
1 parent
c93c152d
Exists in
master
and in
3 other branches
Fix MOD display in BUNDLEBLDR
Fix bug preventing MOD display are multiple selections of MOD in main frame.
Showing
5 changed files
with
30 additions
and
16 deletions
Show diff stats
GUI/SW1/SRC/BUNDLEBLDR.cpp
... | ... | @@ -293,6 +293,7 @@ BUNDLEBLDR::BUNDLEBLDR(wxWindow* parent,wxWindowID id,const wxPoint& pos,const w |
293 | 293 | |
294 | 294 | Panel2->Connect(wxEVT_PAINT,(wxObjectEventFunction)&BUNDLEBLDR::OnPanel2Paint,0,this); |
295 | 295 | Connect(ID_CHECKBOX1,wxEVT_COMMAND_CHECKBOX_CLICKED,(wxObjectEventFunction)&BUNDLEBLDR::OnCheckBox1Click); |
296 | + Connect(ID_CHECKBOX2,wxEVT_COMMAND_CHECKBOX_CLICKED,(wxObjectEventFunction)&BUNDLEBLDR::OnCheckBox2Click); | |
296 | 297 | Connect(ID_COMBOBOX1,wxEVT_COMMAND_COMBOBOX_SELECTED,(wxObjectEventFunction)&BUNDLEBLDR::OnComboBox1Selected); |
297 | 298 | Connect(ID_CHECKBOX3,wxEVT_COMMAND_CHECKBOX_CLICKED,(wxObjectEventFunction)&BUNDLEBLDR::OnCheckBox3Click); |
298 | 299 | Connect(ID_TEXTCTRL4,wxEVT_COMMAND_TEXT_UPDATED,(wxObjectEventFunction)&BUNDLEBLDR::OnTextCtrl4Text); |
... | ... | @@ -407,24 +408,20 @@ BUNDLEBLDR::~BUNDLEBLDR() |
407 | 408 | |
408 | 409 | void BUNDLEBLDR::PopulateTheDirectoryTree (wxString Path) |
409 | 410 | { |
411 | + int size_h, size_v; | |
410 | 412 | |
411 | - #ifdef debug | |
412 | - wxMessageBox(Path, _("PathToMod")); | |
413 | - #endif | |
413 | + tree = (wxSpecificDirCtrl *) NULL; | |
414 | 414 | |
415 | - int size_h, size_v; | |
416 | 415 | Panel2->GetSize(&size_h, &size_v ); |
417 | - //wxGenericDirCtrl *tree; | |
418 | - tree = (wxSpecificDirCtrl *) NULL; | |
419 | - tree = new wxSpecificDirCtrl (Panel2, -1, Path, | |
420 | - wxDefaultPosition, | |
421 | - wxSize(size_h, size_v), | |
422 | - wxSIMPLE_BORDER,//wxDIRCTRL_3D_INTERNAL|wxSUNKEN_BORDER, | |
423 | - "*.cable_spec", 0, | |
424 | - _T("Directory Listing")); | |
425 | 416 | |
426 | - Connect(tree->GetTreeCtrl()->GetId(),wxEVT_COMMAND_TREE_ITEM_ACTIVATED, (wxObjectEventFunction) (wxEventFunction)(wxCommandEventFunction) &BUNDLEBLDR::OnTreeSelectionChanged); | |
417 | + tree = new wxSpecificDirCtrl (Panel2, -1, Path, | |
418 | + wxDefaultPosition, | |
419 | + wxSize(size_h, size_v), | |
420 | + wxSIMPLE_BORDER, | |
421 | + "*.cable_spec", 0, | |
422 | + _T("Directory Listing")); | |
427 | 423 | |
424 | + Connect(tree->GetTreeCtrl()->GetId(),wxEVT_COMMAND_TREE_ITEM_ACTIVATED, (wxObjectEventFunction) (wxEventFunction)(wxCommandEventFunction) &BUNDLEBLDR::OnTreeSelectionChanged); | |
428 | 425 | |
429 | 426 | //SetButtonState_FolderSelected(); |
430 | 427 | } |
... | ... | @@ -477,6 +474,7 @@ void BUNDLEBLDR::SetPathForDir(wxString Path, wxString Name) |
477 | 474 | { |
478 | 475 | PathToMOD << Path; |
479 | 476 | MODname << Name; |
477 | + | |
480 | 478 | PopulateTheDirectoryTree(PathToMOD); |
481 | 479 | } |
482 | 480 | |
... | ... | @@ -1614,3 +1612,18 @@ void BUNDLEBLDR::OnSpinButton1ChangeDown(wxSpinEvent& event) |
1614 | 1612 | |
1615 | 1613 | DrawBundleCsection(); |
1616 | 1614 | } |
1615 | + | |
1616 | +void BUNDLEBLDR::OnCheckBox2Click(wxCommandEvent& event) | |
1617 | +{ | |
1618 | + if (CheckBox2->GetValue()) | |
1619 | + { | |
1620 | + TextCtrl8 -> Disable(); | |
1621 | + SpinButton1 -> Disable(); | |
1622 | + } | |
1623 | + | |
1624 | + if (!CheckBox2->GetValue()) | |
1625 | + { | |
1626 | + TextCtrl8 -> Enable(); | |
1627 | + SpinButton1 -> Enable(); | |
1628 | + } | |
1629 | +} | ... | ... |
GUI/SW1/SRC/BUNDLEBLDR.h
... | ... | @@ -264,6 +264,7 @@ class BUNDLEBLDR: public wxDialog |
264 | 264 | void OnTextCtrl8TextEnter(wxCommandEvent& event); |
265 | 265 | void OnSpinButton1ChangeUp(wxSpinEvent& event); |
266 | 266 | void OnSpinButton1ChangeDown(wxSpinEvent& event); |
267 | + void OnCheckBox2Click(wxCommandEvent& event); | |
267 | 268 | //*) |
268 | 269 | |
269 | 270 | void PopulateTheDirectoryTree ( wxString); | ... | ... |
GUI/SW1/SRC/SW1_GUIMain.cpp
... | ... | @@ -265,7 +265,7 @@ void SW1_GUIFrame::OnSelectMOD(wxCommandEvent& event) |
265 | 265 | wxString selectedFile = dirDialog->GetPath(); |
266 | 266 | |
267 | 267 | SelectedFile = dirDialog->GetPath(); |
268 | - PathToMOD << dirDialog->GetPath(); | |
268 | + PathToMOD = dirDialog->GetPath(); | |
269 | 269 | |
270 | 270 | // Show the selected folder in the status bar |
271 | 271 | SetStatusText(SelectedFile, 0); | ... | ... |
GUI/SW1/SRC/UTILITIES.cpp
... | ... | @@ -72,7 +72,7 @@ void check_is_numeric(wxTextCtrl *TxtBox, int *IsError) |
72 | 72 | TxtBox->Refresh(); |
73 | 73 | } |
74 | 74 | |
75 | - if (*non_numeric || *IsError == 1) | |
75 | + if (!*non_numeric || *IsError == 1) | |
76 | 76 | { |
77 | 77 | TxtBox->SetBackgroundColour(wxColor(255,153,153)); |
78 | 78 | TxtBox->SetFocus(); | ... | ... |