mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-25 04:53:27 -04:00
Morse Decoder: adeed scope and set bytes block size appropriately plus minor changes
This commit is contained in:
@@ -270,16 +270,26 @@ QString MorseDecoderSettings::formatText(const QString& text)
|
||||
{
|
||||
// Format text
|
||||
QString showText = text.simplified();
|
||||
QString spaceFirst;
|
||||
QString spaceLast;
|
||||
|
||||
if (text.size() > 3)
|
||||
if (text.size() >= 2)
|
||||
{
|
||||
if (text.right(1)[0].isSpace()) {
|
||||
showText.append(text.right(1));
|
||||
spaceLast = text.right(1);
|
||||
}
|
||||
if (text.left(1)[0].isSpace()) {
|
||||
showText = text.left(1) + showText;
|
||||
spaceFirst = text.left(1);
|
||||
}
|
||||
}
|
||||
|
||||
if (spaceFirst.size() != 0) {
|
||||
showText = spaceFirst + showText;
|
||||
}
|
||||
|
||||
if (spaceLast.size() != 0) {
|
||||
showText.append(spaceLast);
|
||||
}
|
||||
|
||||
return showText;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user