1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-04-17 11:43:25 +00:00

Columns with Display_Boolean use Combobox editor even for non-boolean values

This commit is contained in:
Stanislav Bas 2015-08-21 22:36:53 +03:00 committed by cc9cii
parent 8c07d7f252
commit 68013bd324

View File

@ -12,6 +12,7 @@
#include <QCheckBox>
#include <QPlainTextEdit>
#include <QEvent>
#include <QItemEditorFactory>
#include "../../model/world/commands.hpp"
#include "../../model/world/tablemimedata.hpp"
@ -173,7 +174,7 @@ QWidget *CSVWorld::CommandDelegate::createEditor (QWidget *parent, const QStyleO
// TODO: Find a better solution?
if (display == CSMWorld::ColumnBase::Display_Boolean)
{
return QStyledItemDelegate::createEditor(parent, option, index);
return QItemEditorFactory::defaultFactory()->createEditor(QVariant::Bool, parent);
}
// For tables the pop-up of the color editor should appear immediately after the editor creation
// (the third parameter of ColorEditor's constructor)