File tree Expand file tree Collapse file tree 1 file changed +28
-6
lines changed
Expand file tree Collapse file tree 1 file changed +28
-6
lines changed Original file line number Diff line number Diff line change @@ -507,20 +507,42 @@ bool EditorViewport::keyPressed(const KeyPress& key)
507507 else if (key.getKeyCode () == key.upKey )
508508 {
509509
510- if (lastEditorClicked-> isMerger () || lastEditorClicked-> isSplitter () )
510+ if (lastEditorClicked)
511511 {
512- lastEditorClicked->switchIO (0 );
513- AccessClass::getProcessorGraph ()->updateViews (lastEditorClicked->getProcessor ());
512+ if (lastEditorClicked->isMerger () || lastEditorClicked->isSplitter ())
513+ {
514+ lastEditorClicked->switchIO (0 );
515+ AccessClass::getProcessorGraph ()->updateViews (lastEditorClicked->getProcessor ());
516+ }
517+ }
518+ else
519+ {
520+ if (editorArray.getFirst ())
521+ {
522+ lastEditorClicked = editorArray.getFirst ();
523+ lastEditorClicked->select ();
524+ }
514525 }
515526
516527 return true ;
517528 }
518529 else if (key.getKeyCode () == key.downKey )
519530 {
520- if (lastEditorClicked-> isMerger () || lastEditorClicked-> isSplitter () )
531+ if (lastEditorClicked)
521532 {
522- lastEditorClicked->switchIO (1 );
523- AccessClass::getProcessorGraph ()->updateViews (lastEditorClicked->getProcessor ());
533+ if (lastEditorClicked->isMerger () || lastEditorClicked->isSplitter ())
534+ {
535+ lastEditorClicked->switchIO (1 );
536+ AccessClass::getProcessorGraph ()->updateViews (lastEditorClicked->getProcessor ());
537+ }
538+ }
539+ else
540+ {
541+ if (editorArray.getFirst ())
542+ {
543+ lastEditorClicked = editorArray.getFirst ();
544+ lastEditorClicked->select ();
545+ }
524546 }
525547 return true ;
526548 }
You can’t perform that action at this time.
0 commit comments