Permalink
Browse files

fix shortcut for closing all open editors

Signed-off-by: Stefan Nussbaumer <st9fan@gmail.com>
  • Loading branch information...
nuss committed Apr 28, 2017
1 parent 23353ec commit 0fab4c4a65a9a0fb8b05f50c80663f62eb9b426e
Showing with 18 additions and 16 deletions.
  1. +18 −16 CVCenter/CVCenterShortcuts.sc
@@ -100,24 +100,26 @@ CVCenterShortcuts {
);
scFunc =
"// close all CVWidget(MS)Editors\n" ++
- AbstractCVWidgetEditor.allEditors.pairsDo({ |k, v|
- switch(CVCenter.cvWidgets[k].class,
- CVWidgetKnob, {
+ {
+ AbstractCVWidgetEditor.allEditors.pairsDo({ |k, v|
+ switch(CVCenter.cvWidgets[k].class,
+ CVWidgetKnob, {
+ v.editor !? { v.editor.close }
+ },
+ CVWidget2D, { #[lo, hi].do({ |sl|
+ v[sl] !? { v[sl].editor !? { v[sl].editor.close }}
+ }) },
+ CVWidgetMS, {
+ CVCenter.cvWidgets[k].msSize.do({ |i|
+ v[i] !? { v[i].editor !? { v[i].editor.close }}
+ })
+ }
+ );
+ CVCenter.cvWidgets[k] !? {
v.editor !? { v.editor.close }
- },
- CVWidget2D, { #[lo, hi].do({ |sl|
- v[sl] !? { v[sl].editor !? { v[sl].editor.close }}
- }) },
- CVWidgetMS, {
- CVCenter.cvWidgets[k].msSize.do({ |i|
- v[i] !? { v[i].editor !? { v[i].editor.close }}
- })
}
- );
- CVCenter.cvWidgets[k] !? {
- v.editor !? { v.editor.close }
- }
- }).asCompileString;
+ })
+ }.asCompileString;
shortcuts.put(
'shift + esc',
(

0 comments on commit 0fab4c4

Please sign in to comment.