From: Olaf Wintermann Date: Thu, 23 Oct 2025 18:39:25 +0000 (+0200) Subject: add workaround for toolkit doc attachment bug X-Git-Url: https://uap-core.de/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fmain;p=note.git add workaround for toolkit doc attachment bug --- diff --git a/application/notebook.c b/application/notebook.c index 89cc77f..ac8a3aa 100644 --- a/application/notebook.c +++ b/application/notebook.c @@ -78,6 +78,15 @@ void notebookmodel_attach(MainWindow *window, NotebookModel *model) { } void notebookmodel_detach(NotebookModel *model) { + // TODO: workaround for a toolkit bug, that reattaching a document + // that has sub-documents will not update all bindings + if(model->current_note) { + //int i = ui_get(model->current_note->model->type); + //printf("type: %d\n", i); + ui_detach_document(model->ctx, model->current_note->model); + model->current_note = NULL; + } + if(model->current_note && model->current_note->model->modified) { //notebookmodel_detach_current_note(model); note_save(model->window->obj, model, model->current_note);