forked from mirror/openmw-tes3mp
do not create editors for unused columns
This commit is contained in:
parent
929b38ff6a
commit
90bae2bead
2 changed files with 13 additions and 0 deletions
|
@ -116,6 +116,16 @@ void CSVWorld::CommandDelegate::setModelData (QWidget *editor, QAbstractItemMode
|
|||
///< \todo provide some kind of feedback to the user, indicating that editing is currently not possible.
|
||||
}
|
||||
|
||||
QWidget *CSVWorld::CommandDelegate::createEditor (QWidget *parent, const QStyleOptionViewItem& option,
|
||||
const QModelIndex& index) const
|
||||
{
|
||||
if (!index.data().isValid())
|
||||
return 0;
|
||||
|
||||
return QStyledItemDelegate::createEditor (parent, option, index);
|
||||
}
|
||||
|
||||
|
||||
void CSVWorld::CommandDelegate::setEditLock (bool locked)
|
||||
{
|
||||
mEditLock = locked;
|
||||
|
|
|
@ -99,6 +99,9 @@ namespace CSVWorld
|
|||
virtual void setModelData (QWidget *editor, QAbstractItemModel *model,
|
||||
const QModelIndex& index) const;
|
||||
|
||||
virtual QWidget *createEditor (QWidget *parent, const QStyleOptionViewItem& option,
|
||||
const QModelIndex& index) const;
|
||||
|
||||
void setEditLock (bool locked);
|
||||
|
||||
bool isEditLocked() const;
|
||||
|
|
Loading…
Reference in a new issue