forked from mirror/openmw-tes3mp
added separate display type for colours
This commit is contained in:
parent
b2ce94f28a
commit
9d5956585c
3 changed files with 5 additions and 3 deletions
|
@ -92,7 +92,8 @@ namespace CSMWorld
|
|||
Display_EnchantmentType,
|
||||
Display_BodyPartType,
|
||||
Display_MeshType,
|
||||
Display_Gender
|
||||
Display_Gender,
|
||||
Display_Colour
|
||||
};
|
||||
|
||||
int mColumnId;
|
||||
|
|
|
@ -634,7 +634,7 @@ namespace CSMWorld
|
|||
{
|
||||
/// \todo Replace Display_Integer with something that displays the colour value more directly.
|
||||
MapColourColumn()
|
||||
: Column<ESXRecordT> (Columns::ColumnId_MapColour, ColumnBase::Display_Integer)
|
||||
: Column<ESXRecordT> (Columns::ColumnId_MapColour, ColumnBase::Display_Colour)
|
||||
{}
|
||||
|
||||
virtual QVariant get (const Record<ESXRecordT>& record) const
|
||||
|
|
|
@ -145,10 +145,11 @@ QWidget *CSVWorld::CommandDelegate::createEditor (QWidget *parent, const QStyleO
|
|||
|
||||
if (display != CSMWorld::ColumnBase::Display_None)
|
||||
{
|
||||
if (variant.type() == QVariant::Color)
|
||||
if (display == CSMWorld::ColumnBase::Display_Colour)
|
||||
{
|
||||
return new QLineEdit(parent);
|
||||
}
|
||||
|
||||
if (display == CSMWorld::ColumnBase::Display_Integer)
|
||||
{
|
||||
return new QSpinBox(parent);
|
||||
|
|
Loading…
Reference in a new issue