diff --git a/src/ui/dialog/dialog-base.h b/src/ui/dialog/dialog-base.h index e3e28e44c9c89ac7bdaa2356eb9dbcc235beb91d..d1b5cc8a57a140a0d9ee41337dc98b0dd386e519 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 efba3be9488e69f765202548d72bdefac8001b72..89686b53d9719304940b11c9a10c322338dc7a4c 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 5e41ff3371744fa155e65ef871f09d54d955edd4..9c8e8518b3a5a695c2af694b5cac5d86b5d69249 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 70c58e55a65260c27a92cc0458f7def238c8425a..806e3ec2ef003bff10e2a09362cd075e29c03864 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 234e3b04c339eadc634ac61124a783b5f664cb9a..bf75a7ce632abf1131f24bc72119284a051dd0d6 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);