Skip to content

Commit

Permalink
Added edit triggers to prevent data column from editing. Removed extr…
Browse files Browse the repository at this point in the history
…a S_UpdateList as it will be called by the event
  • Loading branch information
Detegr committed Feb 9, 2013
1 parent 2921cc3 commit a1a010d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion editor.cpp
Expand Up @@ -401,6 +401,7 @@ void C_Editor::S_OpenDataDialog(const QModelIndex& i)
{
if(i.column() == 2) // Data column
{
m_List->setEditTriggers(QAbstractItemView::NoEditTriggers);
m_DataEditor->setData(i, m_Editor->m_ActivePoly->M_Vertex(i.row()).M_GetData());
m_DataEditor->setVisible(true);
}
Expand All @@ -413,5 +414,5 @@ void C_Editor::S_SetData()
QStandardItem* item=m_Model->itemFromIndex(m_DataEditor->getModelIndex());
if(data.length()) item->setText("*");
else item->setText("");
S_UpdateList(item);
m_List->setEditTriggers(QAbstractItemView::DoubleClicked);
}

0 comments on commit a1a010d

Please sign in to comment.