mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-07-21 05:14:10 +00:00
Columns with Display_Boolean use Combobox editor even for non-boolean values
This commit is contained in:
parent
aeb1acca51
commit
b7295e2632
1 changed files with 2 additions and 1 deletions
|
@ -12,6 +12,7 @@
|
||||||
#include <QCheckBox>
|
#include <QCheckBox>
|
||||||
#include <QPlainTextEdit>
|
#include <QPlainTextEdit>
|
||||||
#include <QEvent>
|
#include <QEvent>
|
||||||
|
#include <QItemEditorFactory>
|
||||||
|
|
||||||
#include "../../model/world/commands.hpp"
|
#include "../../model/world/commands.hpp"
|
||||||
#include "../../model/world/tablemimedata.hpp"
|
#include "../../model/world/tablemimedata.hpp"
|
||||||
|
@ -172,7 +173,7 @@ QWidget *CSVWorld::CommandDelegate::createEditor (QWidget *parent, const QStyleO
|
||||||
// TODO: Find a better solution?
|
// TODO: Find a better solution?
|
||||||
if (display == CSMWorld::ColumnBase::Display_Boolean)
|
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
|
// For tables the pop-up of the color editor should appear immediately after the editor creation
|
||||||
// (the third parameter of ColorEditor's constructor)
|
// (the third parameter of ColorEditor's constructor)
|
||||||
|
|
Loading…
Reference in a new issue