summaryrefslogtreecommitdiffstats
path: root/desktop-widgets
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-03-15 21:51:27 +0100
committerGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-04-07 00:13:35 +0200
commite8beeb6767b387204fcaae4a066f226ca37f8a82 (patch)
tree66d436b52b6db5c25ae1a7400a0b511fa7c9d7ba /desktop-widgets
parentbbd3f0dd6d019245b7708b867e7f4c6522332443 (diff)
downloadsubsurface-e8beeb6767b387204fcaae4a066f226ca37f8a82.tar.gz
desktop: properly initialize activeText of model-delegates
For reasons that I don't understand, we keep track of the current combo-box text for our model-delegates. However, that text was not initialized when the editor was generated, leading to a UI bug in the cylinder and weight widgets: Activate a field, click somewhere else -> either the empty string or the previous string was set. Reported-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets')
-rw-r--r--desktop-widgets/modeldelegates.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/desktop-widgets/modeldelegates.cpp b/desktop-widgets/modeldelegates.cpp
index 65e8f377e..d7dd28b0e 100644
--- a/desktop-widgets/modeldelegates.cpp
+++ b/desktop-widgets/modeldelegates.cpp
@@ -129,6 +129,7 @@ QWidget *ComboBoxDelegate::createEditor(QWidget *parent, const QStyleOptionViewI
currCombo.comboEditor = comboDelegate;
currCombo.currRow = index.row();
currCombo.model = const_cast<QAbstractItemModel *>(index.model());
+ currCombo.activeText = currCombo.model->data(index).toString();
keyboardFinished = false;
// Current display of things on Gnome3 looks like shit, so