diff --git a/MMCore/ConfigGroup.h b/MMCore/ConfigGroup.h index 5350bdcc1c..271ee833c6 100644 --- a/MMCore/ConfigGroup.h +++ b/MMCore/ConfigGroup.h @@ -219,23 +219,28 @@ class ConfigGroupCollection { */ bool RenameConfig(const char* groupName, const char* oldConfigName, const char* newConfigName) { - // tolerate empty group names - if (strlen(groupName) == 0) - return true; - - std::map::iterator it = groups_.find(groupName); - if (it == groups_.end()) - return false; // group not found - if (it->second.Rename(oldConfigName, newConfigName)) + if (0 != strcmp(oldConfigName, newConfigName)) { - // NOTE: changed to not remove empty groups, N.A. 1.31.2006 - // check if the config group is empty, and if so remove it - //if (it->second.IsEmpty()) + // tolerate empty group names + if (strlen(groupName) == 0) + return true; + + std::map::iterator it = groups_.find(groupName); + if (it == groups_.end()) + return false; // group not found + if (it->second.Rename(oldConfigName, newConfigName)) + { + // NOTE: changed to not remove empty groups, N.A. 1.31.2006 + // check if the config group is empty, and if so remove it + //if (it->second.IsEmpty()) //groups_.erase(it->first); + return true; + } + else + return false; // config not found within a group + } else { return true; } - else - return false; // config not found within a group } /** diff --git a/acqEngine/src/org/micromanager/config_editor.clj b/acqEngine/src/org/micromanager/config_editor.clj index 25854881ea..7ec4e08d55 100644 --- a/acqEngine/src/org/micromanager/config_editor.clj +++ b/acqEngine/src/org/micromanager/config_editor.clj @@ -111,7 +111,6 @@ (isCellEditable [_ _] true) (getValueAt [row column] (nth (keys @group-data) row)) (setValueAt [val row column] - (println old-val val row column) (let [old-val (.getValueAt this row column)] (core renameConfig (get-selected-group) old-val val) (update-group-data)))))