[rkward/frameworks] /: Open help page by default, when double clicking on object outside of globalenv
Thomas Friedrichsmeier
null at kde.org
Tue Jun 27 18:52:50 UTC 2017
Git commit 7d56550d0be0eb25d21bb8784f053cd4acb8eb7d by Thomas Friedrichsmeier.
Committed on 27/06/2017 at 18:52.
Pushed by tfry into branch 'frameworks'.
Open help page by default, when double clicking on object outside of globalenv
M +1 -0 ChangeLog
M +8 -5 rkward/windows/robjectbrowser.cpp
https://commits.kde.org/rkward/7d56550d0be0eb25d21bb8784f053cd4acb8eb7d
diff --git a/ChangeLog b/ChangeLog
index e1b5a987..6464a0b8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,4 @@
+- Double click on object in Workspace browser tries to open reference page, not object viewer, if the object is outside of .GlobalEnv
- Implement "split view" feature, allowing to partion the main window, and to hvae several views of the same files / data side-by-side
- Fixed: Creating trellis on-screen plots, while package lattice is not on the search path would produce errors in plot history mechanism
- Limit the number of debug log-files to keep (at most three, each, for frontend and backend)
diff --git a/rkward/windows/robjectbrowser.cpp b/rkward/windows/robjectbrowser.cpp
index 4949da44..cf78f326 100644
--- a/rkward/windows/robjectbrowser.cpp
+++ b/rkward/windows/robjectbrowser.cpp
@@ -2,7 +2,7 @@
robjectbrowser - description
-------------------
begin : Thu Aug 19 2004
- copyright : (C) 2004 - 2016 by Thomas Friedrichsmeier
+ copyright : (C) 2004 - 2017 by Thomas Friedrichsmeier
email : thomas.friedrichsmeier at kdemail.net
***************************************************************************/
@@ -275,10 +275,13 @@ void RObjectBrowserInternal::doubleClicked (const QModelIndex& index) {
if (!object) return;
if (object == RObjectList::getObjectList ()) return;
- if (RKWorkplace::mainWorkplace ()->canEditObject (object)) {
- RKWorkplace::mainWorkplace ()->editObject (object);
+ if (object->isInGlobalEnv ()) {
+ if (RKWorkplace::mainWorkplace ()->canEditObject (object)) {
+ RKWorkplace::mainWorkplace ()->editObject (object);
+ } else {
+ RKWorkplace::mainWorkplace ()->newObjectViewer (object);
+ }
} else {
- RKWorkplace::mainWorkplace ()->flushAllData ();
- RKWorkplace::mainWorkplace ()->newObjectViewer (object);
+ RKHelpSearchWindow::mainHelpSearch ()->getFunctionHelp (object->getShortName (), object->toplevelEnvironment ()->packageName ());
}
}
More information about the rkward-tracker
mailing list