From 1f44f38dcf77bd9312d1818fccc333b0e31773a0 Mon Sep 17 00:00:00 2001 From: Jabiertxof Date: Tue, 19 Feb 2019 14:08:49 +0100 Subject: Fixes LPE Dialog search focus and window sice improvements pointed by Patrick --- src/ui/dialog/livepatheffect-add.cpp | 12 +++++------- src/ui/dialog/livepatheffect-add.h | 1 + 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'src/ui') diff --git a/src/ui/dialog/livepatheffect-add.cpp b/src/ui/dialog/livepatheffect-add.cpp index 452c72eeb..ce9e7464d 100644 --- a/src/ui/dialog/livepatheffect-add.cpp +++ b/src/ui/dialog/livepatheffect-add.cpp @@ -83,6 +83,7 @@ LivePathEffectAdd::LivePathEffectAdd() : converter(Inkscape::LivePathEffect::LPETypeConverter) , _applied(false) , _showfavs(false) + , _started(true) { Glib::ustring gladefile = get_filename(Inkscape::IO::Resource::UIS, "dialog-livepatheffect-add.ui"); try { @@ -554,14 +555,11 @@ void LivePathEffectAdd::show(SPDesktop *desktop) } } } - int width; - int height; - int width_2; - int height_2; - dial._LPEDialogSelector->get_default_size(width_2, height_2); - dial._LPEDialogSelector->get_size(width, height); - if (width == width_2 && height == height_2) { + if (dial._started) { + dial._started = false; Gtk::Window *window = desktop->getToplevel(); + int width; + int height; window->get_size(width, height); dial._LPEDialogSelector->resize(std::min(width - 300, 1440), std::min(height - 300, 900)); } diff --git a/src/ui/dialog/livepatheffect-add.h b/src/ui/dialog/livepatheffect-add.h index d1767ca3e..69c1da421 100644 --- a/src/ui/dialog/livepatheffect-add.h +++ b/src/ui/dialog/livepatheffect-add.h @@ -107,6 +107,7 @@ private: const LivePathEffect::EnumEffectData *_to_add; bool _showfavs; bool _applied; + bool _started; class Effect; const LivePathEffect::EnumEffectDataConverter &converter; static LivePathEffectAdd &instance() -- cgit v1.2.3