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
PIM
KAlarm
Commits
c4fc625b
Commit
c4fc625b
authored
Dec 29, 2020
by
David Jarvie
Browse files
Always show Name column in alarm list header context menu
parent
d030daf4
Pipeline
#45666
canceled with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/alarmlistview.cpp
View file @
c4fc625b
...
...
@@ -134,8 +134,6 @@ void AlarmListView::headerContextMenuRequested(const QPoint& pt)
const
bool
useName
=
Preferences
::
useAlarmName
();
for
(
int
col
=
0
,
count
=
header
()
->
count
();
col
<
count
;
++
col
)
{
if
(
col
==
AlarmListModel
::
NameColumn
&&
!
useName
)
continue
;
const
QString
title
=
almodel
->
headerData
(
col
,
Qt
::
Horizontal
,
ResourceDataModelBase
::
ColumnTitleRole
).
toString
();
if
(
!
title
.
isEmpty
())
{
...
...
@@ -143,6 +141,9 @@ void AlarmListView::headerContextMenuRequested(const QPoint& pt)
act
->
setData
(
col
);
act
->
setCheckable
(
true
);
act
->
setChecked
(
!
header
()
->
isSectionHidden
(
col
));
// Always show Name column, but disabled.
// If the alarm name feature is not enabled, this serves as a small
// hint to the user that the name feature exists.
if
(
col
==
AlarmListModel
::
NameColumn
)
act
->
setEnabled
(
false
);
// don't allow name column to be hidden if name is used
else
if
(
col
==
AlarmListModel
::
TextColumn
&&
!
useName
)
...
...
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