Skip to content

Commit

Permalink
Bugfix #357: Special CB annotations start with ','
Browse files Browse the repository at this point in the history
  • Loading branch information
Isarhamster committed Jan 26, 2025
1 parent 5ba632b commit f797fb4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/database/annotation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@

Annotation::Annotation(QString a)
{
QStringList l = a.trimmed().split(',', SkipEmptyParts );
QStringList l = a.trimmed().split(',', Qt::SkipEmptyParts );
l.removeDuplicates();
annotation = l.join(',');
}

void Annotation::toggle(const QString& e)
{
QStringList l = annotation.split(',');
QStringList l = annotation.split(',', Qt::SkipEmptyParts);
int n = l.indexOf(e);
if (n>=0)
{
Expand All @@ -29,7 +29,7 @@ void Annotation::toggle(const QString& e)

void Annotation::removeOne(const QRegularExpression& re)
{
QStringList l = annotation.split(',');
QStringList l = annotation.split(',', Qt::SkipEmptyParts);
int n = l.indexOf(re);
if (n>=0)
{
Expand Down
4 changes: 2 additions & 2 deletions src/gui/boardview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1282,7 +1282,7 @@ void BoardView::drawSquareAnnotations(QPaintEvent* event)
if (isEnabled())
{
QString annotation = m_board.squareAnnotation();
QStringList list = annotation.split(",");
QStringList list = annotation.split(",", Qt::SkipEmptyParts);

for(QStringList::ConstIterator it = list.constBegin(); it != list.constEnd(); it++)
{
Expand All @@ -1296,7 +1296,7 @@ void BoardView::drawArrowAnnotations(QPaintEvent* event)
if (isEnabled())
{
QString annotation = m_board.arrowAnnotation();
QStringList list = annotation.split(",");
QStringList list = annotation.split(",", Qt::SkipEmptyParts);

for(QStringList::ConstIterator it = list.constBegin(); it != list.constEnd(); it++)
{
Expand Down

0 comments on commit f797fb4

Please sign in to comment.