Commit dfb5bc83 authored by Alexander Semke's avatar Alexander Semke

Allow to change the visibility of worksheet elements with the blank key.

parent 09f7ba9c
......@@ -380,6 +380,12 @@ bool ProjectExplorer::eventFilter(QObject* obj, QEvent* event) {
void ProjectExplorer::keyPressEvent(QKeyEvent* event) {
if (event->matches(QKeySequence::Delete))
deleteSelected();
else if (event->key() == 32) {
auto* aspect = static_cast<AbstractAspect*>(m_treeView->currentIndex().internalPointer());
auto* we = dynamic_cast<WorksheetElement*>(aspect);
if (we)
we->setVisible(!we->isVisible());
}
}
//##############################################################################
......
Markdown is supported
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