[rkward] rkward: Fix focus problem.

Thomas Friedrichsmeier thomas.friedrichsmeier at ruhr-uni-bochum.de
Mon Nov 16 10:19:13 UTC 2015

Git commit 200842aa165530066ec470d708eab34eefdf56dd by Thomas Friedrichsmeier.
Committed on 16/11/2015 at 10:19.
Pushed by tfry into branch 'master'.

Fix focus problem.

M  +2    -0    rkward/misc/rkobjectlistview.cpp
M  +1    -1    rkward/windows/robjectbrowser.cpp


diff --git a/rkward/misc/rkobjectlistview.cpp b/rkward/misc/rkobjectlistview.cpp
index f2fc99e..e4626cc 100644
--- a/rkward/misc/rkobjectlistview.cpp
+++ b/rkward/misc/rkobjectlistview.cpp
@@ -333,6 +333,8 @@ QWidget* RKObjectListViewSettings::filterWidget (QWidget *parent) {
 	connect (persistent_settings_actions[ShowObjectsHidden], SIGNAL (triggered(bool)), hidden_objects_box, SLOT (setChecked(bool)));
 	bottom_layout->addWidget (hidden_objects_box);
+	// KF5 TODO: In frameworks, there is a function KIconUtils::kIconAddOverlay(). We could use this to overlay "view-filter" and discard, then use that
+	// in a tool button (with tooltip), in order to save space.
 	reset_filters_button = new QPushButton (i18nc ("Width is limited, please opt for something that is not much longer than the English string. Simply 'Clear'/'Reset' should be good enough to understand the function.", "Reset filters"), filter_widget);
 	connect (reset_filters_button, SIGNAL (clicked(bool)), this, SLOT(resetFilters()));
 	RKCommonFunctions::setTips (i18n ("Discards the current object search filters"), reset_filters_button);
diff --git a/rkward/windows/robjectbrowser.cpp b/rkward/windows/robjectbrowser.cpp
index b4353ed..5412162 100644
--- a/rkward/windows/robjectbrowser.cpp
+++ b/rkward/windows/robjectbrowser.cpp
@@ -153,7 +153,7 @@ RObjectBrowserInternal::~RObjectBrowserInternal () {
 void RObjectBrowserInternal::focusInEvent (QFocusEvent *e) {
-	list_view->setFocus ();
+	list_view->getSettings ()->filterWidget (this)->setFocus ();
 	if (e->reason () != Qt::MouseFocusReason) {
 		list_view->setObjectCurrent (RObjectList::getGlobalEnv (), true);

More information about the rkward-tracker mailing list