Skip to content

Commit

Permalink
goes with ssc #1083 for ssc issue 1006
Browse files Browse the repository at this point in the history
  • Loading branch information
sjanzou committed Nov 5, 2023
1 parent 9077988 commit 0f062ab
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/simulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1218,7 +1218,11 @@ bool Simulation::InvokeWithHandler(ISimulationHandler *ih, wxString folder)
wxString units(ssc_info_units(p_inf));
wxString ui_hint(ssc_info_uihint(p_inf));
wxString sam_output_name = prepend_name + name; // hybrid processing
if ((prepend_name.Len() > 0) && (prepend_name.Left(prepend_name.length() - 1).Lower() != label.Left(prepend_name.length() - 1).Lower())) { // check for "Battery Battery..."
wxString label_no_space = label;
label_no_space.Replace(" ", "");
if (((prepend_name.Len() > 0) && (label.Len() > prepend_name.Len()))
&& (prepend_name.Left(prepend_name.length() - 1).Lower() != label.Left(prepend_name.length() - 1).Lower()) // check for "Battery Battery..."
&& (prepend_name.Left(prepend_name.length() - 1).Lower() != label_no_space.Left(prepend_name.length() - 1).Lower())) {// check for "FuelCell fuel cell..."
if (label.Left(2) == "AC" || label.Left(2) == "DC") // e.g. PVWatts AC..."
label = prepend_label + label;
else
Expand Down

0 comments on commit 0f062ab

Please sign in to comment.