[niepce/gtk4] Use sigc for trackables to avoid crash



commit 5406309707d96bcb1f0dbd7baed964a53cf94322
Author: Hubert Figuière <hub figuiere net>
Date:   Mon May 9 23:48:10 2022 -0400

    Use sigc for trackables to avoid crash

 src/niepce/ui/selectioncontroller.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/niepce/ui/selectioncontroller.cpp b/src/niepce/ui/selectioncontroller.cpp
index ff81c60..ab90395 100644
--- a/src/niepce/ui/selectioncontroller.cpp
+++ b/src/niepce/ui/selectioncontroller.cpp
@@ -52,9 +52,9 @@ void SelectionController::add_selectable(const IImageSelectable::WeakPtr & selec
     DBG_OUT("added %p", (void*)selectable.get());
     m_selectables.push_back(selectableWeak);
     selectable->image_list()->signal_selection_changed().connect(
-        [this, selectableWeak](){
-            this->selected(selectableWeak);
-        });
+        sigc::bind(
+            sigc::mem_fun(*this, &SelectionController::selected),
+                   selectableWeak));
     selectable->image_list()->signal_item_activated().connect(
         sigc::bind(
             sigc::mem_fun(*this, &SelectionController::activated),


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]