r19086 by jghali - #12279: Guide value reset when clicking value box
scribus-commit
scribus-commit at lists.scribus.net
Thu Apr 24 19:30:24 UTC 2014
Author: jghali
Date: Thu Apr 24 19:30:24 2014
New Revision: 19086
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19086
Log:
#12279: Guide value reset when clicking value box
Modified:
trunk/Scribus/scribus/guidesdelegate.cpp
Modified: trunk/Scribus/scribus/guidesdelegate.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19086&path=/trunk/Scribus/scribus/guidesdelegate.cpp
==============================================================================
--- trunk/Scribus/scribus/guidesdelegate.cpp (original)
+++ trunk/Scribus/scribus/guidesdelegate.cpp Thu Apr 24 19:30:24 2014
@@ -32,7 +32,7 @@
void GuidesDelegate::setEditorData(QWidget *editor,
const QModelIndex &index) const
{
- double value = index.model()->data(index, Qt::DisplayRole).toDouble();
+ double value = index.model()->data(index, Qt::EditRole).toDouble();
ScrSpinBox *w = static_cast<ScrSpinBox*>(editor);
w->setValue(value);
}
@@ -45,7 +45,7 @@
// When user exit widget, editor value may not be commited at this point
// so we have to get value from widget text
double value = w->valueFromText(w->text());
- model->setData(index, value);
+ model->setData(index, value, Qt::EditRole);
}
void GuidesDelegate::updateEditorGeometry(QWidget *editor,
More information about the scribus-commit
mailing list