Re: PgAdmin 1.10 beta 1 - scratch pad won't go away

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Luis Ochoa <ziul1979(at)gmail(dot)com>
Cc: Pgadmin-Support <pgadmin-support(at)postgresql(dot)org>
Subject: Re: PgAdmin 1.10 beta 1 - scratch pad won't go away
Date: 2009-03-18 09:42:00
Message-ID: 937d27e10903180242h64c0550cs6bad6a9d250a4c1f@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers pgadmin-support

[Re-adding the support list]

Hi Luis

On Wed, Mar 18, 2009 at 2:06 AM, Luis Ochoa <ziul1979(at)gmail(dot)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

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message svn 2009-03-18 12:38:45 SVN Commit by mha: r7724 - in trunk/pgadmin3/pgadmin: . ctl db debugger dlg frm gqb include include/ctl include/db include/debugger include/dlg include/frm include/gqb include/schema include/utils schema utils
Previous Message svn 2009-03-18 09:40:15 SVN Commit by dpage: r7723 - in trunk/pgadmin3/pgadmin: frm include/frm

Browse pgadmin-support by date

  From Date Subject
Next Message Andrew Maclean 2009-03-19 02:52:05 pgAdmin v1.10.0 Beta 1
Previous Message Dave Page 2009-03-17 22:12:43 Re: PgAdmin 1.10 beta 1 - scratch pad won't go away