Permalink
Browse files

fix actions display in CVWidgetEditor

Signed-off-by: nuss <st9fan@gmail.com>
  • Loading branch information...
nuss committed Apr 24, 2013
1 parent 30d4bef commit 1e91cbbd3acd13d8df672a5a49eb3552d57ebfce
Showing with 16 additions and 1 deletion.
  1. +16 −1 CVCenter/CVWidgetEditor.sc
View
@@ -867,6 +867,7 @@ CVWidgetEditor {
amendActionsList { |widget, addRemove, name, action, slot, active|
var staticTextFont = Font("Arial", 10);
+ var actTop;
switch(addRemove,
\add, {
@@ -928,13 +929,27 @@ CVWidgetEditor {
;
},
\remove, {
+ actTop = actionsList[name].nameField.bounds.top;
[
actionsList[name].nameField,
actionsList[name].activate,
actionsList[name].removeBut,
actionsList[name].actionView
].do(_.remove);
- flow3.reFlow(thisEditor[\tabs].views[3]);
+ actionsList.removeAt(name);
+ actionsList.pairsDo({ |actName, it|
+ if(it.nameField.bounds.top > actTop, {
+ #[nameField, activate, removeBut, actionView].do({ |name|
+ it[name].bounds_(Rect(
+ it[name].bounds.left,
+ it[name].bounds.top-76,
+ it[name].bounds.width,
+ it[name].bounds.height
+ ))
+ })
+ })
+ });
+ flow3.top_(flow3.top-76);
}
)

0 comments on commit 1e91cbb

Please sign in to comment.