Commit 6aa48944 authored by Tomas Mecir's avatar Tomas Mecir
Browse files

Properly update interface when changing cell contents.

parent db06b08a
Pipeline #185480 passed with stage
in 21 minutes and 26 seconds
......@@ -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)
void CellToolBase::selectionChanged(const Region& region)
......@@ -135,6 +135,7 @@ protected Q_SLOTS:
void focusEditorRequested();
void documentReadWriteToggled(bool enable);
void sheetProtectionToggled(bool enable);
void handleDamages();
// -- cell style actions --
void cellStyle();
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment