diff --git a/deploy/runtime/startup.lk b/deploy/runtime/startup.lk index 381f47b3f2..49724ea7e8 100644 --- a/deploy/runtime/startup.lk +++ b/deploy/runtime/startup.lk @@ -57,6 +57,10 @@ addconfig('PVWatts Wind FuelCell Battery Hybrid', ['Single Owner', 'Host Develop addconfig('Photovoltaic Wind Battery Hybrid', ['Single Owner', 'Host Developer']); addconfig('Generic PVWatts Wind FuelCell Battery Hybrid', ['Single Owner', 'Host Developer']); + +// order tech and fin trees +configopt("TechnologyTreeOrder", {'description' = 'Hybrid,Wind,Generic System,Photovoltaic,Geothermal'}); + // group names 'tree_parent' for performance models are defined in PopulateTech() in main.cpp configopt( 'Flat Plate PV', { 'tree_parent'='Photovoltaic', 'long_name'='Detailed PV Model', 'short_name'='Photovoltaic', 'description'='Photovoltaic system using detailed photovoltaic model with separate module and inverter component models' } ); configopt( 'PVWatts', { 'tree_parent'='Photovoltaic','long_name'='PVWatts', 'short_name'='PVWatts', 'description'='Photovoltaic system using basic NREL PVWatts V8 algorithm. Does not do detailed degradation or loss modeling. If those are important, please use pvsamv1.' } ); diff --git a/src/casewin.cpp b/src/casewin.cpp index ef82f8e462..11aa81d920 100644 --- a/src/casewin.cpp +++ b/src/casewin.cpp @@ -145,9 +145,11 @@ BEGIN_EVENT_TABLE( CaseWindow, wxSplitterWindow ) EVT_MENU(ID_PVUNCERTAINTY, CaseWindow::OnCommand) EVT_MENU( ID_MACRO, CaseWindow::OnCommand ) EVT_LISTBOX( ID_INPUTPAGELIST, CaseWindow::OnCommand ) - EVT_DATAVIEW_SELECTION_CHANGED(ID_TechTree, CaseWindow::OnTechTree) - EVT_DATAVIEW_ITEM_START_EDITING(ID_TechTree, CaseWindow::OnTreeActivated) - EVT_DATAVIEW_ITEM_ACTIVATED(ID_TechTree, CaseWindow::OnTreeActivated) + EVT_DATAVIEW_SELECTION_CHANGED(ID_TechTree, CaseWindow::OnTree) + EVT_DATAVIEW_ITEM_COLLAPSING(ID_TechTree, CaseWindow::OnTreeCollapsing) + +// EVT_DATAVIEW_ITEM_START_EDITING(ID_TechTree, CaseWindow::OnTreeActivated) +// EVT_DATAVIEW_ITEM_ACTIVATED(ID_TechTree, CaseWindow::OnTreeActivated) //EVT_LISTBOX( ID_TechTree, CaseWindow::OnCommand) EVT_BUTTON( ID_EXCL_BUTTON, CaseWindow::OnCommand ) EVT_LISTBOX( ID_EXCL_RADIO, CaseWindow::OnCommand) @@ -377,7 +379,7 @@ bool CaseWindow::RunBaseCase( bool silent, wxString *messages ) m_inputPageList->Select( -1 ); //m_navigationMenu->SetCurrentItem(wxDataViewItem(0)); - wxDataViewItemArray dvia; + // wxDataViewItemArray dvia; m_navigationMenu->UnselectAll(); /* m_navigationMenu->GetModel()->GetChildren(wxDataViewItem(0), dvia); @@ -626,79 +628,48 @@ bool CaseWindow::GenerateReport( wxString pdffile, wxString templfile, VarValue return false; } -void CaseWindow::OnTechTree(wxDataViewEvent&) +void CaseWindow::OnTree(wxDataViewEvent &evt) { - m_pageFlipper->SetSelection(0); - if (m_navigationMenu->IsContainer(m_navigationMenu->GetCurrentItem())) - { - wxDataViewItemArray dvic; - bool keep_open = false; - wxDataViewItem current_item; - wxString test = m_navigationMenu->GetItemText(m_navigationMenu->GetCurrentItem()); - wxString test_previous = m_navigationMenu->GetItemText(m_previousPage); - current_item = m_navigationMenu->GetCurrentItem(); - if (test == "") { //click arrow instead of word - keep_open = true; - current_item = m_previousPage; - //m_navigationMenu->UnselectAll(); - wxString string = m_navigationMenu->GetItemText(current_item); - m_navigationMenu->SetCurrentItem(current_item); - wxDataViewItem parent = m_navigationMenu->GetModel()->GetParent(m_navigationMenu->GetCurrentItem()); - wxString string2 = m_navigationMenu->GetItemText(parent); -// m_navigationMenu->UnselectAll(); -// m_navigationMenu->SetCurrentItem(parent); - SwitchToInputPage(string2 + " Summary"); - //m_navigationMenu->Expand(m_navigationMenu->GetModel()->GetParent(m_navigationMenu->GetCurrentItem())); - m_navigationMenu->Update(); - return; - } - m_navigationMenu->GetModel()->GetChildren(m_navigationMenu->GetCurrentItem(), dvic); - int children_count = dvic.Count(); - for (int i = 0; i < dvic.Count(); i++) { - if (dvic[i] == m_previousPage) { - keep_open = true; - current_item = dvic[i]; - m_navigationMenu->SetCurrentItem(dvic[i]); - //m_navigationMenu->Update(); - return; - } - } - if (!keep_open && m_navigationMenu->IsExpanded(m_navigationMenu->GetCurrentItem())) { - m_navigationMenu->Collapse(m_navigationMenu->GetCurrentItem()); - m_navigationMenu->SetCurrentItem(m_previousPage); - m_navigationMenu->Update(); - return; - } - m_navigationMenu->Expand(m_navigationMenu->GetCurrentItem()); - m_navigationMenu->SetCurrentItem(m_previousPage); - //m_navigationMenu->Update(); - //wxDataViewItemArray dvia; + m_pageFlipper->SetSelection(0); + wxDataViewItem dvi = evt.GetItem(); + if (!dvi.IsOk()) + return; + + if (m_navigationMenu->IsContainer(dvi)) + { + if (m_navigationMenu->IsExpanded(dvi)) + m_navigationMenu->Collapse(dvi); + else + m_navigationMenu->Expand(dvi); + if (m_currentSelection.IsOk()) {// keep current selection + m_navigationMenu->SetCurrentItem(m_currentSelection); + return; + } + else {// select first child + m_currentSelection = m_navigationMenu->GetNthChild(dvi, 0); + m_navigationMenu->SetCurrentItem(m_currentSelection); + } + } + else { + m_currentSelection = evt.GetItem(); + } + wxString title = m_navigationMenu->GetItemText(m_currentSelection); + SwitchToInputPage(title); - /* - m_navigationMenu->GetModel()->GetChildren(m_navigationMenu->GetCurrentItem(), dvia); - if (m_navigationMenu->GetItemText(dvia[0]) != L"") - SwitchToInputPage(m_navigationMenu->GetItemText(dvia[0])); - */ - - } - else { - wxDataViewItemArray dvia; - wxDataViewItem parent = m_navigationMenu->GetModel()->GetParent(m_navigationMenu->GetCurrentItem()); - m_navigationMenu->GetModel()->GetChildren(parent, dvia); - if (dvia.Count() > 0) { - SwitchToInputPage(m_navigationMenu->GetItemText(m_navigationMenu->GetCurrentItem())); - m_previousPage = (m_navigationMenu->GetCurrentItem()); - } - m_navigationMenu->Update(); - - } - //m_navigationMenu->Update(); - } -void CaseWindow::OnTreeActivated(wxDataViewEvent& evt) +void CaseWindow::OnTreeCollapsing(wxDataViewEvent& evt) { - evt.Veto(); + wxDataViewItem dvi = evt.GetItem(); + if (dvi.IsOk() && m_navigationMenu->IsContainer(dvi)) { + auto selectedDVI = m_navigationMenu->GetCurrentItem(); + if (selectedDVI.IsOk()) { + for (size_t i = 0; i < m_navigationMenu->GetChildCount(dvi); i++) { + if (selectedDVI == m_navigationMenu->GetNthChild(dvi, i)) + evt.Veto(); + } + } + } } void CaseWindow::OnCommand( wxCommandEvent &evt ) @@ -712,6 +683,7 @@ void CaseWindow::OnCommand( wxCommandEvent &evt ) { m_inputPageList->Select( -1 ); m_pageFlipper->SetSelection( 1 ); + m_navigationMenu->UnselectAll(); } else if ( evt.GetId() == ID_ADVANCED ) { @@ -1481,7 +1453,7 @@ void CaseWindow::UpdateConfiguration() m_navigationMenu->SetCurrentItem(dvic[0]); SwitchToInputPage(m_navigationMenu->GetItemText(m_navigationMenu->GetCurrentItem())); } - m_previousPage = (m_navigationMenu->GetCurrentItem()); + m_currentSelection = (m_navigationMenu->GetCurrentItem()); // check for orphaned notes and if any found add to first page per Github issue 796 CheckAndUpdateNotes(inputPageHelpContext); diff --git a/src/casewin.h b/src/casewin.h index f1873b542c..3505988f7d 100644 --- a/src/casewin.h +++ b/src/casewin.h @@ -151,7 +151,7 @@ class CaseWindow : public wxSplitterWindow, CaseEventListener wxStaticText* m_finLabel; wxMetroButton *m_simButton, *m_resultsButton; wxMetroDataViewTreeCtrl *m_navigationMenu; - wxDataViewItem m_previousPage; + wxDataViewItem m_currentSelection; // to allow switching case configurations with P50/P90 and PVUncertainty wxGridSizer *m_szsims; @@ -169,8 +169,8 @@ class CaseWindow : public wxSplitterWindow, CaseEventListener wxString m_lastPageNoteId; void OnCommand( wxCommandEvent & ); - void OnTechTree(wxDataViewEvent&); - void OnTreeActivated(wxDataViewEvent &evt ); + void OnTree(wxDataViewEvent&); + void OnTreeCollapsing(wxDataViewEvent &evt ); virtual void OnCaseEvent( Case *, CaseEvent & ); void OnSubNotebookPageChanged( wxNotebookEvent &evt ); diff --git a/src/main.cpp b/src/main.cpp index 548d8fe76a..3f7385d50c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2739,11 +2739,10 @@ void SamApp::InstallPythonPackage(const std::string& pip_name) { enum { ID_TechTree = wxID_HIGHEST+98, ID_FinTree }; BEGIN_EVENT_TABLE(ConfigDialog, wxDialog) -EVT_DATAVIEW_ITEM_START_EDITING(ID_TechTree, ConfigDialog::OnTreeActivated) -EVT_DATAVIEW_ITEM_START_EDITING(ID_FinTree, ConfigDialog::OnFinTreeDoubleClick) -EVT_DATAVIEW_ITEM_ACTIVATED(ID_TechTree, ConfigDialog::OnTreeActivated) -EVT_DATAVIEW_ITEM_ACTIVATED(ID_FinTree, ConfigDialog::OnFinTreeDoubleClick) -EVT_DATAVIEW_SELECTION_CHANGED(ID_TechTree, ConfigDialog::OnTechTree) + EVT_DATAVIEW_ITEM_COLLAPSING(ID_TechTree, ConfigDialog::OnTechTreeCollapsing) + EVT_DATAVIEW_ITEM_COLLAPSING(ID_FinTree, ConfigDialog::OnFinTreeCollapsing) + EVT_DATAVIEW_ITEM_ACTIVATED(ID_FinTree, ConfigDialog::OnFinTreeDoubleClick) + EVT_DATAVIEW_SELECTION_CHANGED(ID_TechTree, ConfigDialog::OnTechTree) EVT_DATAVIEW_SELECTION_CHANGED(ID_FinTree, ConfigDialog::OnFinTree) EVT_BUTTON( wxID_HELP, ConfigDialog::OnHelp ) EVT_BUTTON( wxID_OK, ConfigDialog::OnOk ) @@ -2906,14 +2905,15 @@ void ConfigDialog::GetConfiguration(wxString &t, wxString &f) void ConfigDialog::PopulateTech() { + // clear tree m_pTech->DeleteAllItems(); - + // list all technologies m_tnames = SamApp::Config().GetTechnologies(); - wxString bin_name; - wxArrayString tech_list; - wxDataViewItemArray dvia{m_tnames.Count()}; - + //wxString bin_name; + //wxArrayString tech_list; + //wxDataViewItemArray dvia{m_tnames.Count()}; + /* for (int j = 0; j < m_tnames.Count(); j++) { wxString L(SamApp::Config().Options(m_tnames[j]).LongName); wxString TP(SamApp::Config().Options(m_tnames[j]).TreeParent); @@ -2930,6 +2930,107 @@ void ConfigDialog::PopulateTech() m_pTech->AppendItem(wxDataViewItem(0), L); } } + */ + // tree containers and nodes + wxArrayString containers, nodes, added; + for (int j = 0; j < m_tnames.Count(); j++) { + wxString node(SamApp::Config().Options(m_tnames[j]).LongName); + wxString container(SamApp::Config().Options(m_tnames[j]).TreeParent); + if (node.IsEmpty()) node = m_tnames[j]; + if (container != "" && containers.Index(container) == wxNOT_FOUND && container != "Retired") + containers.Add(container); + else if (node.Find("Retired") == wxNOT_FOUND) + nodes.Add(node); + } + + wxDataViewItemArray dvia{containers.Count()}; + + // order from startup.lk configopt("TechnologyTreeOrder", ... + wxString TreeOrder = SamApp::Config().Options("TechnologyTreeOrder").Description; + /* + if (TreeOrder.length() < 1) { // non-ordered + wxArrayString tech_list; + wxDataViewItemArray dvia{m_tnames.Count()}; + + for (int j = 0; j < m_tnames.Count(); j++) { + wxString L(SamApp::Config().Options(m_tnames[j]).LongName); + wxString TP(SamApp::Config().Options(m_tnames[j]).TreeParent); + if (L.IsEmpty()) L = m_tnames[j]; + if (tech_list.Index(TP) == wxNOT_FOUND && TP != "" && TP != "Retired") { + tech_list.Add(TP); + dvia[tech_list.Index(TP)] = m_pTech->AppendContainer(wxDataViewItem(0), TP); + } + if (TP.Find("Retired") != wxNOT_FOUND); //do nothing for Retired technologies + else if (tech_list.Index(TP) != wxNOT_FOUND) { + m_pTech->AppendItem(dvia[tech_list.Index(TP)],L); + } + else { + m_pTech->AppendItem(wxDataViewItem(0), L); + } + } + } + else*/ { // ordered per Description + wxArrayString order = wxSplit(TreeOrder, ','); + for (auto& item : order) { + if (containers.Index(item) != wxNOT_FOUND) + dvia[containers.Index(item)] = m_pTech->AppendContainer(wxDataViewItem(0), item); + else if (nodes.Index(item) != wxNOT_FOUND) + m_pTech->AppendItem(wxDataViewItem(0), item); + } + // append remaining nodes to appropriate containers + for (auto& item : m_tnames) { + wxString node(SamApp::Config().Options(item).LongName); + wxString container(SamApp::Config().Options(item).TreeParent); + if (node.IsEmpty()) node = item; + // skip those already added + if (order.Index(node) != wxNOT_FOUND) continue; + if (order.Index(container) != wxNOT_FOUND) + m_pTech->AppendItem(dvia[containers.Index(container)], node); + else { + if (added.Index(container) == wxNOT_FOUND && container != "" && container != "Retired") { + added.Add(container); + dvia[containers.Index(container)] = m_pTech->AppendContainer(wxDataViewItem(0), container); + } + if (container.Find("Retired") != wxNOT_FOUND); //do nothing for Retired technologies + else if (containers.Index(container) != wxNOT_FOUND) { + m_pTech->AppendItem(dvia[containers.Index(container)], node); + } + else { + m_pTech->AppendItem(wxDataViewItem(0), node); + } + + } + } + /* + // TODO - handle those not specified in TreeOrder + wxArrayString tech_list; +// dvia.Clear(); +// dvia.resize(m_tnames.Count()); +// wxDataViewItemArray dvia{ m_tnames.Count() }; + + for (int j = 0; j < m_tnames.Count(); j++) { + wxString L(SamApp::Config().Options(m_tnames[j]).LongName); + wxString TP(SamApp::Config().Options(m_tnames[j]).TreeParent); + if (L.IsEmpty()) L = m_tnames[j]; + if (order.Index(TP) != wxNOT_FOUND) continue; + if (order.Index(L) != wxNOT_FOUND) continue; + if (tech_list.Index(TP) == wxNOT_FOUND && TP != "" && TP != "Retired") { + tech_list.Add(TP); + dvia[tech_list.Index(TP)] = m_pTech->AppendContainer(wxDataViewItem(0), TP); + } + if (TP.Find("Retired") != wxNOT_FOUND); //do nothing for Retired technologies + else if (tech_list.Index(TP) != wxNOT_FOUND) { + m_pTech->AppendItem(dvia[tech_list.Index(TP)], L); + } + else { + m_pTech->AppendItem(wxDataViewItem(0), L); + } + + } + */ + } + + // Manually add groups here - eventually move to startup.lk //wxDataViewItem cont_pv = m_pTech->AppendContainer(wxDataViewItem(0), "Photovoltaic"); @@ -2967,27 +3068,25 @@ void ConfigDialog::PopulateTech() void ConfigDialog::UpdateFinTree() { + m_finDVI = wxDataViewItem(0); m_pFin->DeleteAllItems(); m_fnames = SamApp::Config().GetFinancingForTech(m_techname); + m_finname = ""; wxDataViewItem cont_ppa; wxDataViewItem cont_dist; //wxDataViewItem cont_tpo; //TPO - for (size_t i = 0; i < m_fnames.Count(); i++) - { + for (size_t i = 0; i < m_fnames.Count(); i++) { wxString TP(SamApp::Config().Options(m_fnames[i]).TreeParent); - if (TP.Find("PPA") != wxNOT_FOUND) - { + if (TP.Find("PPA") != wxNOT_FOUND) { cont_ppa = m_pFin->AppendContainer(wxDataViewItem(0), "Power Purchase Agreement"); break; } } - for (size_t i = 0; i < m_fnames.Count(); i++) - { + for (size_t i = 0; i < m_fnames.Count(); i++) { wxString TP(SamApp::Config().Options(m_fnames[i]).TreeParent); - if (TP.Find("DISTRIBUTED") != wxNOT_FOUND) - { + if (TP.Find("DISTRIBUTED") != wxNOT_FOUND) { cont_dist = m_pFin->AppendContainer(wxDataViewItem(0), "Distributed"); break; } @@ -3003,15 +3102,14 @@ void ConfigDialog::UpdateFinTree() }*/ - for (size_t i = 0; i < m_fnames.Count(); i++) - { + for (size_t i = 0; i < m_fnames.Count(); i++) { wxString L(SamApp::Config().Options(m_fnames[i]).LongName); if (L.IsEmpty()) L = m_fnames[i]; wxString TP(SamApp::Config().Options(m_fnames[i]).TreeParent); if (TP.Find("PPA") != wxNOT_FOUND) m_pFin->AppendItem(cont_ppa, L); else if (TP.Find("DISTRIBUTED") != wxNOT_FOUND) - m_pFin->AppendItem(cont_dist, L); + m_pFin->AppendItem(cont_dist, L); /*else if (TP.Find("TPO") != wxNOT_FOUND) //TPO m_pFin->AppendItem(cont_tpo, L);*/ else @@ -3019,11 +3117,37 @@ void ConfigDialog::UpdateFinTree() } } -void ConfigDialog::OnTreeActivated(wxDataViewEvent &evt) + + +void ConfigDialog::OnTechTreeCollapsing(wxDataViewEvent& evt) +{ + wxDataViewItem dvi = evt.GetItem(); + if (dvi.IsOk() && m_pTech->IsContainer(dvi)) { + auto selectedDVI = m_pTech->GetCurrentItem(); + if (selectedDVI.IsOk()) { + for (size_t i = 0; i < m_pTech->GetChildCount(dvi); i++) { + if (selectedDVI == m_pTech->GetNthChild(dvi, i)) + evt.Veto(); + } + } + } +} + +void ConfigDialog::OnFinTreeCollapsing(wxDataViewEvent& evt) { - evt.Veto(); + wxDataViewItem dvi = evt.GetItem(); + if (dvi.IsOk() && m_pFin->IsContainer(dvi)) { + auto selectedDVI = m_pFin->GetCurrentItem(); + if (selectedDVI.IsOk()) { + for (size_t i = 0; i < m_pFin->GetChildCount(dvi); i++) { + if (selectedDVI == m_pFin->GetNthChild(dvi, i)) + evt.Veto(); + } + } + } } + void ConfigDialog::OnFinTreeDoubleClick(wxDataViewEvent &evt) { if (SamApp::Config().Find(m_techname, m_finname) != NULL) @@ -3033,22 +3157,36 @@ void ConfigDialog::OnFinTreeDoubleClick(wxDataViewEvent &evt) } -void ConfigDialog::OnTechTree(wxDataViewEvent &) +void ConfigDialog::OnTechTree(wxDataViewEvent &evt) { - if (m_pTech->IsContainer(m_pTech->GetCurrentItem())) - { - m_pTech->Expand(m_pTech->GetCurrentItem()); - m_techname = ""; + wxDataViewItem dvi = evt.GetItem(); + if (!dvi.IsOk()) return; + + if (m_pTech->IsContainer(dvi)) + { + if (m_pTech->IsExpanded(dvi)) + m_pTech->Collapse(dvi); + else + m_pTech->Expand(dvi); + if (m_techDVI.IsOk()) {// keep current selection + m_pTech->SetCurrentItem(m_techDVI); + return; + } + else {// select first child + m_techDVI = m_pTech->GetNthChild(dvi, 0); + m_pTech->SetCurrentItem(m_techDVI); + } } - wxString title = m_pTech->GetItemText(m_pTech->GetCurrentItem()); + else { + m_techDVI = evt.GetItem(); + } + wxString title = m_pTech->GetItemText(m_techDVI); if (title.empty()) title = "None"; m_techname = title; - for (size_t i = 0; i < m_tnames.Count(); i++) - { - if (SamApp::Config().Options(m_tnames[i]).LongName == m_techname) - { + for (size_t i = 0; i < m_tnames.Count(); i++) { + if (SamApp::Config().Options(m_tnames[i]).LongName == m_techname) { m_techname = m_tnames[i]; break; } @@ -3057,22 +3195,36 @@ void ConfigDialog::OnTechTree(wxDataViewEvent &) UpdateFinTree(); } -void ConfigDialog::OnFinTree(wxDataViewEvent &) +void ConfigDialog::OnFinTree(wxDataViewEvent &evt) { - if (m_pFin->IsContainer(m_pFin->GetCurrentItem())) - { - m_pFin->Expand(m_pFin->GetCurrentItem()); - m_finname = ""; + wxDataViewItem dvi = evt.GetItem(); + if (!dvi.IsOk()) return; + + if (m_pFin->IsContainer(dvi)) + { + if (m_pFin->IsExpanded(dvi)) + m_pFin->Collapse(dvi); + else + m_pFin->Expand(dvi); + if (m_finDVI.IsOk()) {// keep current selection + m_pFin->SetCurrentItem(m_finDVI); + return; + } + else {// select first child + m_finDVI = m_pFin->GetNthChild(dvi, 0); + m_pFin->SetCurrentItem(m_finDVI); + } + } + else { + m_finDVI = evt.GetItem(); } - wxString title = m_pFin->GetItemText(m_pFin->GetCurrentItem()); - if (title.empty() || m_pFin->IsContainer(m_pFin->GetCurrentItem())) + wxString title = m_pFin->GetItemText(m_finDVI); + if (title.empty()) title = "None"; m_finname = title; - for (size_t i = 0; i < m_fnames.Count(); i++) - { - if (SamApp::Config().Options(m_fnames[i]).LongName == m_finname) - { + for (size_t i = 0; i < m_fnames.Count(); i++) { + if (SamApp::Config().Options(m_fnames[i]).LongName == m_finname) { m_finname = m_fnames[i]; break; } diff --git a/src/main.h b/src/main.h index 83e56b54f2..5a7c65c8ae 100644 --- a/src/main.h +++ b/src/main.h @@ -408,7 +408,7 @@ DECLARE_APP( SamApp ); class wxCheckBox; class wxMetroButton; class wxMetroListBox; -class wxMetroDataViewTreeCtrl; +class wxMetroDataViewCtrl; class ConfigDialog : public wxDialog { @@ -427,8 +427,9 @@ class ConfigDialog : public wxDialog private: void PopulateTech(); bool ValidateSelections(); - void OnTreeActivated(wxDataViewEvent &evt); + void OnTechTreeCollapsing(wxDataViewEvent& evt); void OnTechTree(wxDataViewEvent &); + void OnFinTreeCollapsing(wxDataViewEvent& evt); void OnFinTree(wxDataViewEvent &); void OnFinTreeDoubleClick(wxDataViewEvent &); @@ -437,6 +438,8 @@ class ConfigDialog : public wxDialog wxMetroDataViewTreeCtrl *m_pTech, *m_pFin; wxArrayString m_tnames, m_fnames; wxString m_techname, m_finname; + wxDataViewItem m_techDVI, m_finDVI; + void OnOk( wxCommandEvent & ); void OnCancel( wxCommandEvent & );