summaryrefslogtreecommitdiff
path: root/ui/qt/interface_tree_cache_model.cpp
diff options
context:
space:
mode:
authorRoland Knall <rknall@gmail.com>2016-10-19 15:33:35 +0200
committerAnders Broman <a.broman58@gmail.com>2016-10-19 18:59:56 +0000
commit5ab49c623df23a5d19cffdc29f912dd1d2798ca9 (patch)
tree7546d03a57a22eb88ea7a6cea69ce37e73d6f7f9 /ui/qt/interface_tree_cache_model.cpp
parentc92cc9c95a8bc45c932bb37775627657994e906d (diff)
downloadwireshark-5ab49c623df23a5d19cffdc29f912dd1d2798ca9.tar.gz
InterfaceList: Changing text clears the cell
If the cell is double-clicked to edit an existing text, it is cleared upon start of the edit widget Change-Id: I9d718635de5c4b091aab1f88c2482434aaae1286 Reviewed-on: https://code.wireshark.org/review/18319 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui/qt/interface_tree_cache_model.cpp')
-rw-r--r--ui/qt/interface_tree_cache_model.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/qt/interface_tree_cache_model.cpp b/ui/qt/interface_tree_cache_model.cpp
index 65c540e83c..6aea7dc451 100644
--- a/ui/qt/interface_tree_cache_model.cpp
+++ b/ui/qt/interface_tree_cache_model.cpp
@@ -231,7 +231,7 @@ QVariant InterfaceTreeCacheModel::data(const QModelIndex &index, int role) const
int row = index.row();
InterfaceTreeColumns col = (InterfaceTreeColumns)index.column();
- if ( ( role == Qt::DisplayRole && editableColumns.contains(col) ) ||
+ if ( ( ( role == Qt::DisplayRole || role == Qt::EditRole ) && editableColumns.contains(col) ) ||
( role == Qt::CheckStateRole && checkableColumns.contains(col) ) )
{
QMap<InterfaceTreeColumns, QVariant> * dataField = 0;