[rkward] /: Accept underscore in name of new data.frames.

Thomas Friedrichsmeier null at kde.org
Thu Nov 1 12:37:26 GMT 2018


Git commit a525193f49c5bf76124a28bd80b831f793bb883b by Thomas Friedrichsmeier.
Committed on 01/11/2018 at 12:35.
Pushed by tfry into branch 'master'.

Accept underscore in name of new data.frames.

BUG: 400545

M  +1    -0    ChangeLog
M  +1    -1    rkward/core/rcontainerobject.cpp

https://commits.kde.org/rkward/a525193f49c5bf76124a28bd80b831f793bb883b

diff --git a/ChangeLog b/ChangeLog
index 3014cf07..35aa8e8c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,5 @@
 --- Version 0.7.1 - UNRELEASED
+- Fixed: Underscore (_) was not accepted in names of newly created data.frames
 - <browser> element in save file mode gains checkbox to control overwriting of existing files
 - Fixed: <browser> element could not be set to not required
 - Fixed: max.print option was not saved, correctly, when set from RKWard settings
diff --git a/rkward/core/rcontainerobject.cpp b/rkward/core/rcontainerobject.cpp
index 22652733..785b00c0 100644
--- a/rkward/core/rcontainerobject.cpp
+++ b/rkward/core/rcontainerobject.cpp
@@ -384,7 +384,7 @@ QString RContainerObject::validizeName (const QString &child_name, bool unique)
 	QString ret = child_name;
 	if (ret.isEmpty ()) ret = "var";
 	else {
-		ret = ret.replace (QRegExp ("[^a-zA-Z0-9]"), ".");
+		ret = ret.replace (QRegExp ("[^a-zA-Z0-9_]"), ".");
 		ret = ret.replace (QRegExp ("^\\.*[0-9]+"), ".");
 	}
 	if (!unique) return ret;



More information about the rkward-tracker mailing list