PixInsight Forum (historical)

Software Development => PCL and PJSR Development => Topic started by: Nocturnal on 2010 July 29 14:08:59

Title: PCL: on startup my dialog is sometimes much too wide
Post by: Nocturnal on 2010 July 29 14:08:59

Hi,

I've been struggling with an annoying problem with one of my processes.

- use process
- cancel process (it's a dynamic one)
- open process again
- now dialog is very wide, extends way to the right

It seems process location and size is stored somewhere and I'm not doing the right thing to restore it on load. What could be the cause?
Title: Re: PCL: on startup my dialog is sometimes much too wide
Post by: Juan Conejero on 2010 July 29 16:26:56
Hi Sander,

I'd need to take a look at your code to help you. It might be an issue with Sizer. The geometry of a ProcessInterface is always stored in the core settings file unless you call ProcessInterface::DisableAutoSaveGeometry() explicitly from your code.
Title: Re: PCL: on startup my dialog is sometimes much too wide
Post by: Nocturnal on 2010 July 29 17:05:25
Hi Juan,

I sent a zip with the sources your way.

Title: Re: PCL: on startup my dialog is sometimes much too wide
Post by: Juan Conejero on 2010 July 29 17:15:18
Thanks Sander. I'll take a look and will post here.
Title: Re: PCL: on startup my dialog is sometimes much too wide
Post by: Juan Conejero on 2010 July 31 05:25:57
Hi Sander,

I've already sent your code with the pertinent revisions. The tricky bit that you were missing is a call to AdjustToContents() at the end of your GUIData constructor. Always call this member function after having populated your interface's main sizer.

Excellent and very useful tool you're cooking. Hope to see it published soon ;)
Title: Re: PCL: on startup my dialog is sometimes much too wide
Post by: Nocturnal on 2010 July 31 06:51:13
Thanks Juan, got your email :)