mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-28 23:36:42 +00:00
changing the enumdelegate seteditordata
This commit is contained in:
parent
9612c6a6fd
commit
1f1774b5e1
1 changed files with 8 additions and 1 deletions
|
@ -60,7 +60,14 @@ void CSVWorld::EnumDelegate::setEditorData (QWidget *editor, const QModelIndex&
|
||||||
{
|
{
|
||||||
if (QComboBox *comboBox = dynamic_cast<QComboBox *> (editor))
|
if (QComboBox *comboBox = dynamic_cast<QComboBox *> (editor))
|
||||||
{
|
{
|
||||||
int value = index.data (Qt::EditRole).toInt();
|
QVariant data = index.data (Qt::EditRole);
|
||||||
|
|
||||||
|
if (!data.isValid())
|
||||||
|
{
|
||||||
|
data = index.data (Qt::DisplayRole);
|
||||||
|
}
|
||||||
|
|
||||||
|
int value = data.toInt();
|
||||||
|
|
||||||
std::size_t size = mValues.size();
|
std::size_t size = mValues.size();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue