aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Knall <rknall@gmail.com>2019-07-18 23:18:09 +0200
committerRoland Knall <rknall@gmail.com>2019-07-18 21:52:08 +0000
commitea924f7e6105b4e6a86bebdc00adda6cd8025a99 (patch)
treebca2c97594ffcfaa07e4cac00850ef59a033dd32
parent7c7d8ee3d7bfaa867768f9ac1551c20967781bed (diff)
Qt: Use correct name for copy
If the element to copy from has already been renamed, use the new (not yet saved) name Change-Id: I868c8ba18566adf9fbad4f1e42a22bdcd9fcbe99 Reviewed-on: https://code.wireshark.org/review/34012 Petri-Dish: Roland Knall <rknall@gmail.com> Reviewed-by: Roland Knall <rknall@gmail.com>
-rw-r--r--ui/qt/models/profile_model.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/qt/models/profile_model.cpp b/ui/qt/models/profile_model.cpp
index 95f0ebc63a..ada4c8ba16 100644
--- a/ui/qt/models/profile_model.cpp
+++ b/ui/qt/models/profile_model.cpp
@@ -475,7 +475,7 @@ QModelIndex ProfileModel::duplicateEntry(QModelIndex idx)
return QModelIndex();
QString parent = prof->name;
- if (!prof->is_global)
+ if ( ! prof->is_global && prof->status != PROF_STAT_CHANGED )
parent = get_profile_parent (prof->name);
QString new_name;