From 0bf1a6041a4169b16170bbe2200b3603d162fe35 Mon Sep 17 00:00:00 2001 From: yggverse Date: Tue, 27 Aug 2024 15:06:43 +0300 Subject: [PATCH] use local object --- src/app/browser/main/tab/label.cpp | 6 +++--- src/app/browser/main/tab/label.hpp | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/app/browser/main/tab/label.cpp b/src/app/browser/main/tab/label.cpp index babb1757..da67da2d 100644 --- a/src/app/browser/main/tab/label.cpp +++ b/src/app/browser/main/tab/label.cpp @@ -10,14 +10,14 @@ Label::Label( ); // Setup label controller - controller = Gtk::GestureClick::create(); + auto GtkGestureClick_RefPtr = Gtk::GestureClick::create(); /* @TODO remove as default controller->set_button( GDK_BUTTON_PRIMARY );*/ - controller->signal_pressed().connect( + GtkGestureClick_RefPtr->signal_pressed().connect( [this](int n, double x, double y) { if (n == 2) // double click @@ -30,7 +30,7 @@ Label::Label( ); add_controller( - controller + GtkGestureClick_RefPtr ); } diff --git a/src/app/browser/main/tab/label.hpp b/src/app/browser/main/tab/label.hpp index cee9b35d..4ea4f261 100644 --- a/src/app/browser/main/tab/label.hpp +++ b/src/app/browser/main/tab/label.hpp @@ -11,8 +11,6 @@ namespace app::browser::main::tab { class Label : public Gtk::Label { - Glib::RefPtr controller; - public: Label(