[Re-adding the support list]
Hi Luis
On Wed, Mar 18, 2009 at 2:06 AM, Luis Ochoa <ziul1979@gmail.com> wrote:
> Then the bug:
>
>> There is still a slight oddity there - when you return to the SQL pane
>> from the GQB, the width of the scratch pad returns to it's default.
>> Luis; any idea what's causing that?
>
> The problem is the Scratch pad and outputPane are not inside the
> sqlNotebook:
> sqlNotebook->AddPage(sqlQuery, _("SQL Editor"));
> sqlNotebook->AddPage(controller->getViewContainer(), _("Graphical Query
> Builder"));
Yup.
> instead it's located at the wxAUI just like the sqlNotebook, because of this
> I create a little hack that show/hide the scratchPad when you change between
> the SQL Editor and the GQB, but this hack have a side effect that I don't
> know until now and right now I don't know how to fix it.
> ...
> manager.AddPane(outputPane, ...);
> manager.AddPane(scratchPad, ...);
> manager.AddPane(sqlNotebook, ...);
>
> The problem is here:
> if(sqlNotebook && sqlNotebook->GetPageCount() >= 2)
> {
>
> if (event.GetSelection() == 0)
> {
> ...
> if (viewMenu->IsChecked(MNU_OUTPUTPANE))
> manager.GetPane(wxT("outputPane")).Show(true);
> if (viewMenu->IsChecked(MNU_SCRATCHPAD))
> manager.GetPane(wxT("scratchPad")).Show(true);
> manager.Update();
> ...
> }
> else
> {
> manager.GetPane(wxT("outputPane")).Show(false);
> manager.GetPane(wxT("scratchPad")).Show(false);
> manager.Update();
> ...
> }
>
> When I use the show / hide function in wxAui the objects are hide, but when
> they're show they recover their original size and not the previous size,
> because of this the bug affect either scratchPad and outputPane.
That's the code I changed to fix Ray's problem - the code was
unconditionally re-enabling the two panes, whereas it now only
re-enables them if they were visible to begin with.
However, that isn't the cause of the resizing as far as I'm aware - we
can usually turn panes on and off without them losing their size. In
fact, when the scratch pad is re-displayed, it looks to me as though
it does take it's original size to begin with, and then resizes, so I
wonder if it's part of the GQB layout code that's causing a resize.
I'm suspicious of the code that's fired by the timer.
> I'm going to research for a solution and probably this weekend I will fix
> it, meanwhile I disable this function on this patch to demostrate how it
> affect the GUI. But if you have any ideas or suggestions welcome!
I haven't applied the patch as we're in beta now, so I don't want to
apply anything except the final bug fix. I have applied the control ID
fix though - thaks.
> P.S. I don't send this mail to pgadmin-hackers list because you sent it
> directly to me.
Only because I wasn't sure if you're watching the support list :-p
--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com