From a1a010df993501b4e8dfd493039bd4d5f4caaea8 Mon Sep 17 00:00:00 2001 From: Detegr Date: Sat, 9 Feb 2013 16:41:12 +0200 Subject: [PATCH] Added edit triggers to prevent data column from editing. Removed extra S_UpdateList as it will be called by the event --- editor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/editor.cpp b/editor.cpp index 94b6cb3..63cc984 100644 --- a/editor.cpp +++ b/editor.cpp @@ -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); } @@ -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); }