improve help implementation
This commit is contained in:
1 parent
2dcc63875d
commit
9ef24e3a9e
10 files changed
+52
-26
No files matched your search
@@ -353,11 +353,12 @@ void EnhanceDlg::resizeEvent(QResizeEvent *event)
|
||||
void EnhanceDlg::keyPressEvent(QKeyEvent *event)
|
||||
{
|
||||
const QKeySequence pressed(event->key() | event->modifiers());
|
||||
if (KeyBindings::bHelp && pressed.matches(KeyBindings::bHelp->shortCut) == QKeySequence::ExactMatch)
|
||||
if (KeyBindings::bHelp && pressed.matches(KeyBindings::bHelp->shortCut) == QKeySequence::ExactMatch) {
|
||||
// TODO: needs a live HelpDlg instance's textIndex() (Term.pas's
|
||||
// MainScreen.HelpDlg isn't ported yet) - placeholder text index.
|
||||
Help::showNewContent(windowModeMakePersistent(windowMode()), Help::LinkCategory::Text, 0);
|
||||
else
|
||||
if (auto *dlg = Term::mainScreenHelpDlg())
|
||||
dlg->showNewContent(windowModeMakePersistent(windowMode()), Help::LinkCategory::Text, 0);
|
||||
} else
|
||||
FramedDlg::keyPressEvent(event);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user