[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kbibtex/kbibtex/0.7] src/gui/element: Fixing minor issue with fix for bug 371593
From: Thomas Fischer <fischer () unix-ag ! uni-kl ! de>
Date: 2016-11-19 22:12:24
Message-ID: E1c8Ds0-0001ai-JO () code ! kde ! org
[Download RAW message or body]
Git commit 35923912d616eaa0382bf7db68d562aa596319d5 by Thomas Fischer, on behalf of Juergen Spitzmueller.
Committed on 19/11/2016 at 21:20.
Pushed by thomasfischer into branch 'kbibtex/0.7'.
Fixing minor issue with fix for bug 371593
There was a small glitch in previous the commit that was meant
to fix bug 371593: Customized text was set too early and then
overwritten. This commit fixes the problem.
Signed-off-by: Thomas Fischer <fischer@unix-ag.uni-kl.de>
M +4 -1 src/gui/element/elementwidgets.cpp
http://commits.kde.org/kbibtex/35923912d616eaa0382bf7db68d562aa596319d5
diff --git a/src/gui/element/elementwidgets.cpp b/src/gui/element/elementwidgets.cpp
index 54fd963..a812abd 100644
--- a/src/gui/element/elementwidgets.cpp
+++ b/src/gui/element/elementwidgets.cpp
@@ -370,7 +370,6 @@ bool ReferenceWidget::reset(QSharedPointer<const Element> element)
buttonSuggestId->setEnabled(!isReadOnly);
const BibTeXEntries *be = BibTeXEntries::self();
QString type = be->format(entry->type(), KBibTeX::cUpperCamelCase);
- entryType->lineEdit()->setText(type);
int index = entryType->findData(type);
if (index == -1) {
const QString typeLower(type.toLower());
@@ -381,6 +380,10 @@ bool ReferenceWidget::reset(QSharedPointer<const Element> element)
}
}
entryType->setCurrentIndex(index);
+ if (index == -1) {
+ /// A customized value not known to KBibTeX
+ entryType->lineEdit()->setText(type);
+ }
entryId->setText(entry->id());
/// New entries have no values. Use this fact
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic