Re: Bug in status window - Mailing list pgadmin-hackers

From Guillaume Lelarge
Subject Re: Bug in status window
Date
Msg-id 4BB76C26.8010806@lelarge.info
Whole thread Raw
In response to Re: Bug in status window  (Guillaume Lelarge <guillaume@lelarge.info>)
Responses Re: Bug in status window  (Dave Page <dpage@pgadmin.org>)
List pgadmin-hackers
Le 03/04/2010 17:52, Guillaume Lelarge a écrit :
> Le 03/04/2010 17:08, Dave Page a écrit :
>> On Sat, Apr 3, 2010 at 3:18 PM, Guillaume Lelarge
>> <guillaume@lelarge.info> wrote:
>>> Le 27/03/2010 20:02, Dave Page a écrit :
>>>> I found a bug in the status window. When the activity lines are
>>>> refreshed, it tries to update them in place, to avoid removing and
>>>> re-adding every line. That doesn't work if the rows are sorted using
>>>> the column headers on the list view, and results in blank lines
>>>> replacing existing ones. Or at least, that appears to be whats
>>>> happening.
>>>>
>>>
>>> I'm not able to reproduce this. Really, I wonder how a sort is possible
>>> in the status window. A click on an activity line cause a function to be
>>> executed, but it only deals with the "activating" of the cancel and
>>> terminate buttons.
>>>
>>> Care to tell us more about this issue?
>>
>> When the grid is refreshed, rather than remove and re-add all the rows
>> (which would lose the users selection and scroll position), the code
>> attempts to update each of the original rows with the correct data.
>>
>> We seem to have gained the ability to sort by each column, by clicking
>> on the column header. However, if you do that, the in-place update
>> appears to get confused, and in my testing resulted in rows getting
>> blanked out.
>>
>> To reproduce:
>>
>> - Run pgAdmin, connect to a database
>> - Open a query tool, in a database on the server other than the maintenance DB
>>   (at this point, I have a browser and querytool connection in the
>> 'phpwiki' database, and the maintenance DB connection in 'postgres').
>> - Open the server status dialog
>> - Double-click the 'Database' row header in the Activity pane to sort the rows
>>
>> Watch the first two rows vanish, one at a time on subsequent
>> refreshes. Changing the database sort order (by clicking on the
>> header) restores the rows on the next refresh.
>>
>
> OK, I see that too. Happens only on Mac. Makes me wonder how wxWidgets
> can be qualified as a "cross-platform" toolkit.
>
> I'm gonna work on this.
>

See patch attached. It fixes the issue by using the generic control
rather than the native one (which means ordering the listview is no more
possible).

Sounds good to you? or would you rather keep the capacity to order the list?


--
Guillaume.
 http://www.postgresqlfr.org
 http://dalibo.com

Attachment

pgadmin-hackers by date:

Previous
From: Guillaume Lelarge
Date:
Subject: Re: Bug in status window
Next
From: "pgAdmin Trac"
Date:
Subject: [pgAdmin III] #163: Crash with the Statistics tab