+int LabelGUI::button_release_event()
+{
+ int ret = BC_Toggle::button_release_event();
+ test_drag_label(0);
+ return ret;
+}
+
+int LabelGUI::test_drag_label(int press)
+{
+ if( is_event_win() && get_buttonpress() == 1 ) {
+ switch( timebar->current_operation ) {
+ case TIMEBAR_NONE:
+ if( press && get_value() ) {
+ timebar->current_operation = TIMEBAR_DRAG_LABEL;
+ timebar->drag_label = this;
+ set_cursor(HSEPARATE_CURSOR, 0, 0);
+ mwindow->undo->update_undo_before(_("drag label"), this);
+ return 1;
+ }
+ break;
+ case TIMEBAR_DRAG_LABEL:
+ if( !press ) {
+ timebar->current_operation = TIMEBAR_NONE;
+ timebar->drag_label = 0;
+ set_cursor(ARROW_CURSOR, 0, 0);
+ mwindow->undo->update_undo_after(_("drag label"), LOAD_TIMEBAR);
+ mwindow->awindow->gui->async_update_assets(); // labels folder
+ }
+ break;
+ }
+ }
+ return 0;
+}
+