mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 19:13:24 +00:00
Fix Ubuntu glitch with completer popup
On Ubuntu, the completer often prevents applying/discarding the changes on the dive info pane and disrupts editing of other fields as well. This patch prevents the completer popup from appearing when not in edit mode (apply or discard is pressed) or when the string is still empty. Fixes #818 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
62bc751bd9
commit
e1db5f21b1
1 changed files with 8 additions and 0 deletions
|
@ -85,6 +85,14 @@ void TagWidget::reparse()
|
|||
if (pos.first >= 0 && pos.second > 0)
|
||||
currentText = text().mid(pos.first, pos.second - pos.first).trimmed();
|
||||
|
||||
/*
|
||||
* Do not show the completer when not in edit mode - basically
|
||||
* this returns when we are accepting or discarding the changes.
|
||||
*/
|
||||
if (MainWindow::instance()->information()->isEditing() == false || currentText.length() == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_completer) {
|
||||
m_completer->setCompletionPrefix(currentText);
|
||||
if (m_completer->completionCount() == 1) {
|
||||
|
|
Loading…
Add table
Reference in a new issue