Commit c9a57214 authored by Giacomo Strangolino's avatar Giacomo Strangolino
Browse files

fixed extra newline in alarm info w. Filter fixes

parent 22623709
...@@ -293,6 +293,11 @@ ...@@ -293,6 +293,11 @@
<string>ALARM</string> <string>ALARM</string>
</property> </property>
</item> </item>
<item>
<property name="text">
<string>ERROR</string>
</property>
</item>
<item> <item>
<property name="text"> <property name="text">
<string>NORMAL</string> <string>NORMAL</string>
...@@ -307,17 +312,27 @@ ...@@ -307,17 +312,27 @@
</property> </property>
<item> <item>
<property name="text"> <property name="text">
<string>log</string> <string>highest</string>
</property>
</item>
<item>
<property name="text">
<string>high</string>
</property>
</item>
<item>
<property name="text">
<string>medium</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text">
<string>warning</string> <string>low</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text">
<string>fault</string> <string>lowest</string>
</property> </property>
</item> </item>
</widget> </widget>
......
...@@ -109,7 +109,7 @@ QString AlarmInfoW::m_line_break(const QString &s, int linelen) const ...@@ -109,7 +109,7 @@ QString AlarmInfoW::m_line_break(const QString &s, int linelen) const
} }
out += line + "\n"; out += line + "\n";
} }
if(out.endsWith("\n")) for(int i = out.length() - 1; i >=0 && out[i] == '\n'; i--)
out.remove(out.length() - 1, 1); // remove last \n out.remove(i, 1);
return out; return out;
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment