mirror of https://github.com/CGAL/cgal
editorEvent Fix
- I accidently changed the QAbstractItemModel of the argmument of the function into a QStandardItemModel.
This commit is contained in:
parent
4d5962a284
commit
d3336372b7
|
|
@ -665,11 +665,10 @@ void Scene::itemChanged(Scene_item* /* item */)
|
|||
this->createIndex(m_entries.size() - 1, LastColumn));
|
||||
}
|
||||
|
||||
bool SceneDelegate::editorEvent(QEvent *event, QStandardItemModel *model,
|
||||
bool SceneDelegate::editorEvent(QEvent *event, QAbstractItemModel *model,
|
||||
const QStyleOptionViewItem &option,
|
||||
const QModelIndex &index)
|
||||
{
|
||||
qDebug()<<"editor event";
|
||||
QAbstractProxyModel* proxyModel = dynamic_cast<QAbstractProxyModel*>(model);
|
||||
Q_ASSERT(proxyModel);
|
||||
Scene *scene = dynamic_cast<Scene*>(proxyModel->sourceModel());
|
||||
|
|
|
|||
|
|
@ -168,6 +168,7 @@ private Q_SLOTS:
|
|||
for(int i=0; i<5; i++)
|
||||
{
|
||||
list<<new QStandardItem();
|
||||
list.at(i)->setEditable(false);
|
||||
}
|
||||
for(int i=0; i<rowCount(); i++)
|
||||
{
|
||||
|
|
@ -202,7 +203,7 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
bool editorEvent(QEvent *event, QStandardItemModel *model,
|
||||
bool editorEvent(QEvent *event, QAbstractItemModel *model,
|
||||
const QStyleOptionViewItem &option,
|
||||
const QModelIndex &index);
|
||||
void paint(QPainter *painter, const QStyleOptionViewItem &option,
|
||||
|
|
|
|||
Loading…
Reference in New Issue