-Removing of UI binding element working

This commit is contained in:
Harry van Haaren 2013-11-19 21:55:52 +00:00
parent 9ab22c78b8
commit a079134735
2 changed files with 9 additions and 2 deletions

View file

@ -168,6 +168,11 @@ static void deleteBindingFromController(Fl_Widget* w, void* ud)
EventControllerBindingRemove e( self->controllerID, tmp );
writeToDspRingbuffer( &e );
// remove "this" widget (and its parent Pack) from the list of MIDI bindings:
self->bindingsPack->remove( w->parent() );
self->bindingsPack->redraw();
self->scroll->redraw();
}

View file

@ -46,6 +46,10 @@ class ControllerUI
char* name;
OptionsWindow* optionsWindow;
// public to redraw when removing from static
Fl_Scroll* scroll;
Fl_Pack* bindingsPack;
private:
// bindings
@ -56,8 +60,6 @@ class ControllerUI
Fl_Box* authorLabel;
Fl_Box* emailLabel;
Fl_Scroll* scroll;
Fl_Pack* bindingsPack;
std::vector<int> bindingID;
Fl_Box* targetLabel;