Skip to content
Permalink
Browse files

Fix {ctype} sign macro displaying Empty for non-element ctypes

  • Loading branch information...
LBPHacker committed Apr 2, 2019
1 parent 58a3411 commit c8df51a8b3b510fa05ee4477274d16e81b90f3ee
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/simulation/Sign.cpp
@@ -116,11 +116,11 @@ String sign::getText(Simulation *sim)
}
else if (between_curlies == "type")
{
formatted_text << (part ? sim->BasicParticleInfo(*part) : (formatted_text.Size() ? String::Build("empty") : String::Build("Empty")));
formatted_text << (part ? sim->BasicParticleInfo(*part) : (formatted_text.Size() ? "empty" : "Empty"));
}
else if (between_curlies == "ctype")
{
formatted_text << ((part && part->ctype && sim->IsValidElement(part->ctype)) ? sim->ElementResolve(part->ctype, -1) : (formatted_text.Size() ? String::Build("empty") : String::Build("Empty")));
formatted_text << (part ? ((part->ctype && sim->IsValidElement(part->ctype)) ? sim->ElementResolve(part->ctype, -1) : String::Build(part->ctype)) : (formatted_text.Size() ? "empty" : "Empty"));
}
else if (between_curlies == "life")
{

0 comments on commit c8df51a

Please sign in to comment.
You can’t perform that action at this time.