Adds logic for description field

This commit is contained in:
lantzelot 2020-12-09 16:49:02 +01:00
parent 5a5fc814c9
commit b2324741e5
2 changed files with 3 additions and 1 deletions

BIN
pcusb.db

Binary file not shown.

View File

@ -59,7 +59,9 @@ public class InfoModel extends AbstractModel
public void setDescription(String description)
{
String old = getDescription();
this.description = description;
//Replace all double spaces, tabs and newlines
this.description = description.replaceAll("\\s\\s+", " ");
this.description = this.description.replace("\t", " ");
if (!Objects.equals(old, description))
{
notifyChange();