From 8b0b2b37a6fa7368d513963d095142f16f4fad97 Mon Sep 17 00:00:00 2001 From: avee12x2 Date: Wed, 12 Mar 2025 17:43:52 +0530 Subject: [PATCH] Fixed Issue 5547 --- src/ui/dialog/dialog-base.h | 2 +- src/ui/dialog/extensions-gallery.cpp | 5 +++++ src/ui/dialog/extensions-gallery.h | 1 + src/ui/dialog/livepatheffect-editor.cpp | 5 +++++ src/ui/dialog/livepatheffect-editor.h | 1 + 5 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/ui/dialog/dialog-base.h b/src/ui/dialog/dialog-base.h index e3e28e44c9..d1b5cc8a57 100644 --- a/src/ui/dialog/dialog-base.h +++ b/src/ui/dialog/dialog-base.h @@ -67,7 +67,7 @@ public: void blink(); // find focusable widget to grab focus - void focus_dialog(); + virtual void focus_dialog(); // return focus back to canvas void defocus_dialog(); bool getShowing() { return _showing; } diff --git a/src/ui/dialog/extensions-gallery.cpp b/src/ui/dialog/extensions-gallery.cpp index efba3be948..89686b53d9 100644 --- a/src/ui/dialog/extensions-gallery.cpp +++ b/src/ui/dialog/extensions-gallery.cpp @@ -582,4 +582,9 @@ Glib::RefPtr ExtensionsGallery::get_image(const std::string& key, } } +void ExtensionsGallery::focus_dialog() { + DialogBase::focus_dialog(); + _search.grab_focus(); +} + } // namespace Inkscape::UI::Dialog diff --git a/src/ui/dialog/extensions-gallery.h b/src/ui/dialog/extensions-gallery.h index 5e41ff3371..9c8e8518b3 100644 --- a/src/ui/dialog/extensions-gallery.h +++ b/src/ui/dialog/extensions-gallery.h @@ -54,6 +54,7 @@ class ExtensionsGallery : public DialogBase { public: enum Type { Filters, Effects }; + void focus_dialog() override; ExtensionsGallery(Type type); private: diff --git a/src/ui/dialog/livepatheffect-editor.cpp b/src/ui/dialog/livepatheffect-editor.cpp index 70c58e55a6..806e3ec2ef 100644 --- a/src/ui/dialog/livepatheffect-editor.cpp +++ b/src/ui/dialog/livepatheffect-editor.cpp @@ -1131,6 +1131,11 @@ void LivePathEffectEditor::do_item_action_favorite(PathEffectSharedPtr const &, _item_type = ""; // here we force reload even with the same tipe item selected } +void LivePathEffectEditor::focus_dialog() { + DialogBase::focus_dialog(); + _lpes_popup.get_entry().grab_focus(); +} + } // namespace Inkscape::UI::Dialog /* diff --git a/src/ui/dialog/livepatheffect-editor.h b/src/ui/dialog/livepatheffect-editor.h index 234e3b04c3..bf75a7ce63 100644 --- a/src/ui/dialog/livepatheffect-editor.h +++ b/src/ui/dialog/livepatheffect-editor.h @@ -60,6 +60,7 @@ class LivePathEffectEditor final : public DialogBase { public: LivePathEffectEditor(); + void focus_dialog() override; ~LivePathEffectEditor() final; void move_list(int origin, int dest); -- GitLab