mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps] Probability: enable to copy content of non-editable calculations
This commit is contained in:
committed by
EmilieNumworks
parent
26bbfa85ec
commit
30e6d0b3f0
@@ -82,6 +82,15 @@ void CalculationController::didBecomeFirstResponder() {
|
||||
app()->setFirstResponder(&m_selectableTableView);
|
||||
}
|
||||
|
||||
bool CalculationController::handleEvent(Ion::Events::Event event) {
|
||||
if (event == Ion::Events::Copy && selectedColumn() > 0) {
|
||||
CalculationCell * myCell = static_cast<CalculationCell *>(m_selectableTableView.selectedCell());
|
||||
Clipboard::sharedClipboard()->store(myCell->editableTextCell()->textField()->text());
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
View * CalculationController::view() {
|
||||
return &m_contentView;
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ public:
|
||||
/* Responder */
|
||||
void didEnterResponderChain(Responder * previousResponder) override;
|
||||
void didBecomeFirstResponder() override;
|
||||
bool handleEvent(Ion::Events::Event event) override;
|
||||
|
||||
/* ViewController */
|
||||
View * view() override;
|
||||
|
||||
Reference in New Issue
Block a user