Skip to content

Commit

Permalink
Merge pull request #164 from NREL/hybrids
Browse files Browse the repository at this point in the history
New Hybrid Configurations
  • Loading branch information
sjanzou authored Sep 18, 2023
2 parents 8324d45 + 83bc1f0 commit d28005f
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- name: Get git ref of sibling dependency LK
run: |
ref=$(git ls-remote --exit-code git://github.com/NREL/lk.git refs/heads/develop | awk '{print $1}')
ref=$(git ls-remote --exit-code https://github.com/NREL/lk.git refs/heads/develop | awk '{print $1}')
echo "ref_of_lk=$ref" | tee --append $GITHUB_ENV
- name: Get cached build data of sibling dependency LK
uses: actions/cache@v2
Expand All @@ -61,16 +61,18 @@ jobs:
cd $GITHUB_WORKSPACE/lk
cmake -Bbuild_linux -DCMAKE_BUILD_TYPE=Debug
cmake --build build_linux -- -j
- name: Set LKDIR and LKD_LIB envs
- name: Set LKDIR
run: |
echo "LKDIR=$GITHUB_WORKSPACE/lk" >>$GITHUB_ENV
echo "LKD_LIB=$GITHUB_WORKSPACE/lk/build_linux" >>$GITHUB_ENV # iff CMAKE_BUILD_TYPE=Debug
- name: Set LKD_LIB
run: |
echo "LKD_LIB=$GITHUB_WORKSPACE/lk/build_linux" >>$GITHUB_ENV
- name: Set RAPIDJSONDIR
run: |
echo "RAPIDJSONDIR=$GITHUB_WORKSPACE/ssc" >>$GITHUB_ENV
- name: Get git ref of sibling dependency SSC
run: |
ref=$(git ls-remote --exit-code git://github.com/NREL/ssc.git refs/heads/develop | awk '{print $1}')
ref=$(git ls-remote --exit-code https://github.com/NREL/ssc.git refs/heads/develop | awk '{print $1}')
echo "ref_of_ssc=$ref" | tee --append $GITHUB_ENV
- name: Get cached build data of sibling dependency SSC
uses: actions/cache@v2
Expand Down
2 changes: 2 additions & 0 deletions include/wex/dview/dvselectionlist.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ class wxDVSelectionListCtrl : public wxScrolledWindow, public wxDVAutoColourAssi

int Append(const wxString &name, const wxString &group = wxEmptyString); // returns row index
int AppendNoUpdate(const wxString &name, const wxString &group);
int AppendNoUpdate(const wxString& name, const wxString& group, const wxString& hybrid_bin);

void
Append(const wxArrayString &names, const wxString &group = wxEmptyString); // add a whole list with the same group
Expand Down Expand Up @@ -138,6 +139,7 @@ class wxDVSelectionListCtrl : public wxScrolledWindow, public wxDVAutoColourAssi
wxColour color;
wxString label;
wxString group;
wxString hybrid_bin = "";
bool value[NMAXCOLS];
bool enable[NMAXCOLS];
wxRect geom[NMAXCOLS]; // filled in by renderer
Expand Down
17 changes: 17 additions & 0 deletions src/dview/dvselectionlist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,23 @@ int wxDVSelectionListCtrl::AppendNoUpdate(const wxString &name, const wxString &
return m_itemList.size() - 1;
}

int wxDVSelectionListCtrl::AppendNoUpdate(const wxString& name, const wxString& group, const wxString& hybrid_bin) {
row_item* x = new row_item;
x->label = name;
x->group = group;
x->hybrid_bin = hybrid_bin;
for (int i = 0; i < NMAXCOLS; i++) {
x->value[i] = false;
x->enable[i] = true;
}
x->shown = true;

m_itemList.push_back(x);
x->row_index = m_itemList.size() - 1;

return m_itemList.size() - 1;
}

int wxDVSelectionListCtrl::Append(const wxString &name, const wxString &group) {
int idx = AppendNoUpdate(name, group);

Expand Down

0 comments on commit d28005f

Please sign in to comment.