[rkward/work/render_rmd] rkward/misc: Avoid shortcut conflicts with previews

Thomas Friedrichsmeier null at kde.org
Fri May 11 13:10:19 UTC 2018


Git commit e1f5e6a2a42c3fa07aebd7bff2e6cc95e5057ee7 by Thomas Friedrichsmeier.
Committed on 11/05/2018 at 13:10.
Pushed by tfry into branch 'work/render_rmd'.

Avoid shortcut conflicts with previews

M  +3    -0    rkward/misc/rkxmlguipreviewarea.cpp

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

diff --git a/rkward/misc/rkxmlguipreviewarea.cpp b/rkward/misc/rkxmlguipreviewarea.cpp
index e95d225a..9384f9a7 100644
--- a/rkward/misc/rkxmlguipreviewarea.cpp
+++ b/rkward/misc/rkxmlguipreviewarea.cpp
@@ -115,6 +115,9 @@ void RKXMLGUIPreviewArea::childEvent (QChildEvent *event) {
 			menuBar ()->hide ();
 			QList<KToolBar*> tbars = toolBars ();
 			for (int i = 0; i < tbars.size (); ++i) tbars[i]->hide ();
+			// avoid shortcut conflicts
+			QList<QAction*> acts = actions ();
+			for (int i = 0; i < acts.size (); ++i) acts[i]->setShortcutContext(Qt::WidgetWithChildrenShortcut);
 		}
 	}
 	QObject::childEvent (event);



More information about the rkward-tracker mailing list