Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Education
Cantor
Commits
9840bfb9
Commit
9840bfb9
authored
Feb 03, 2019
by
Nikita Sirgienko
Browse files
Fix bug with unfocused entry after Cantor start
BUG: 395976
FIXED-IN: 18.12.2
parent
28730c17
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/cantor.cpp
View file @
9840bfb9
...
...
@@ -35,6 +35,7 @@
#include
<QDir>
#include
<QFileDialog>
#include
<QPushButton>
#include
<QGraphicsView>
#include
"lib/backend.h"
#include
"lib/panelpluginhandler.h"
...
...
@@ -301,6 +302,9 @@ void CantorShell::addWorksheet(const QString& backendName)
int
tab
=
m_tabWidget
->
addTab
(
part
->
widget
(),
QIcon
::
fromTheme
(
backend
->
icon
()),
i18n
(
"Session %1"
,
sessionCount
++
));
m_tabWidget
->
setCurrentIndex
(
tab
);
// Setting focus on worksheet view, because Qt clear focus of added widget inside addTab
// This fix https://bugs.kde.org/show_bug.cgi?id=395976
part
->
widget
()
->
findChild
<
QGraphicsView
*>
()
->
setFocus
();
}
else
delete
part
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment