Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
System Settings
Commits
8e28113e
Commit
8e28113e
authored
Jan 21, 2021
by
Fabian Vogt
Browse files
[Icon View] Don't open modules twice on clicking
changeModule is called on activated and clicked now.
parent
98cf5ba4
Changes
1
Show whitespace changes
Inline
Side-by-side
icons/IconMode.cpp
View file @
8e28113e
...
...
@@ -149,11 +149,17 @@ void IconMode::searchChanged(const QString &text)
void
IconMode
::
changeModule
(
const
QModelIndex
&
activeModule
)
{
// Already loaded?
MenuItem
*
item
=
activeModule
.
data
(
Qt
::
UserRole
).
value
<
MenuItem
*>
();
if
(
d
->
moduleView
->
activeModule
()
==
&
item
->
item
())
return
;
changeModuleWithArgs
(
activeModule
,
QStringList
());
}
void
IconMode
::
changeModuleWithArgs
(
const
QModelIndex
&
activeModule
,
const
QStringList
&
args
)
{
// Always reopen because args might have changed
d
->
moduleView
->
closeModules
();
d
->
mainWidget
->
setCurrentWidget
(
d
->
moduleView
);
...
...
Fabian Vogt
@fvogt
mentioned in commit
cad2c981
·
Jan 25, 2021
mentioned in commit
cad2c981
mentioned in commit cad2c9816d6e2efef1fcf682d408d47085fab23a
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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