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
Office
Calligra
Commits
6aa48944
Commit
6aa48944
authored
Jun 04, 2022
by
Tomas Mecir
Browse files
Properly update interface when changing cell contents.
parent
db06b08a
Pipeline
#185480
passed with stage
in 21 minutes and 26 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
sheets/ui/CellToolBase.cpp
View file @
6aa48944
...
...
@@ -1112,6 +1112,9 @@ void CellToolBase::activate(ToolActivation toolActivation, const QSet<KoShape*>
this
,
&
CellToolBase
::
documentReadWriteToggled
);
connect
(
selection
(),
&
Selection
::
sheetProtectionToggled
,
this
,
&
CellToolBase
::
sheetProtectionToggled
);
Map
*
map
=
selection
()
->
activeSheet
()
->
fullMap
();
connect
(
map
,
&
MapBase
::
damagesFlushed
,
this
,
&
CellToolBase
::
handleDamages
);
}
void
CellToolBase
::
deactivate
()
...
...
@@ -1264,6 +1267,15 @@ KoInteractionStrategy* CellToolBase::createStrategy(KoPointerEvent* event)
return
new
SelectionStrategy
(
this
,
position
,
event
->
modifiers
());
}
// This makes sure that the action buttons stay updated whenever we change anything.
void
CellToolBase
::
handleDamages
()
{
const
Cell
cell
=
Cell
(
selection
()
->
activeSheet
(),
selection
()
->
cursor
());
if
(
!
cell
)
return
;
d
->
updateActions
(
cell
);
}
void
CellToolBase
::
selectionChanged
(
const
Region
&
region
)
{
Q_UNUSED
(
region
);
...
...
sheets/ui/CellToolBase.h
View file @
6aa48944
...
...
@@ -135,6 +135,7 @@ protected Q_SLOTS:
void
focusEditorRequested
();
void
documentReadWriteToggled
(
bool
enable
);
void
sheetProtectionToggled
(
bool
enable
);
void
handleDamages
();
// -- cell style actions --
void
cellStyle
();
...
...
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