mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fix redundant spaces in info panel
Remove redundant spaces from dive master and buddy list fields. Ticket also mentions about similar space behaviour in tag field, which I couldn't reproduce. Fixes #476 Signed-off-by: Lakshman Anumolu <acrlakshman@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
d2f1a02523
commit
df7d7d4981
1 changed files with 8 additions and 2 deletions
|
@ -853,14 +853,20 @@ void markChangedWidget(QWidget *w)
|
|||
|
||||
void MainTab::on_buddy_textChanged()
|
||||
{
|
||||
QString text = ui.buddy->toPlainText().split(",", QString::SkipEmptyParts).join(", ");
|
||||
QStringList text_list = ui.buddy->toPlainText().split(",", QString::SkipEmptyParts);
|
||||
for (int i = 0; i < text_list.size(); i++)
|
||||
text_list[i] = text_list[i].trimmed();
|
||||
QString text = text_list.join(", ");
|
||||
EDIT_SELECTED_DIVES(EDIT_TEXT(mydive->buddy, text));
|
||||
markChangedWidget(ui.buddy);
|
||||
}
|
||||
|
||||
void MainTab::on_divemaster_textChanged()
|
||||
{
|
||||
QString text = ui.divemaster->toPlainText().split(",", QString::SkipEmptyParts).join(", ");
|
||||
QStringList text_list = ui.divemaster->toPlainText().split(",", QString::SkipEmptyParts);
|
||||
for (int i = 0; i < text_list.size(); i++)
|
||||
text_list[i] = text_list[i].trimmed();
|
||||
QString text = text_list.join(", ");
|
||||
EDIT_SELECTED_DIVES(EDIT_TEXT(mydive->divemaster, text));
|
||||
markChangedWidget(ui.divemaster);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue