← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] DRC: do not close and reopen progress dialog

 

On Wed, Aug 17, 2016 at 02:42:53PM +0200, jp charras wrote:
> Le 17/08/2016 à 14:24, Chris Pavlina a écrit :
> > On Wed, Aug 17, 2016 at 01:44:40PM +0200, jp charras wrote:
> >> Le 17/08/2016 à 13:39, Chris Pavlina a écrit :
> >>> On Aug 17, 2016 06:47, "jp charras" <jp.charras@xxxxxxxxxx <mailto:jp.charras@xxxxxxxxxx>> wrote:
> >>>>
> >>>> Le 12/08/2016 à 15:18, Chris Pavlina a écrit :
> >>>>> Gah, it works here. There's always some system-specific issue with wx,
> >>>>> isn't there.
> >>>>>
> >>>>> Okay, don't merge, I'll test this on all the platforms.
> >>>>>
> >>>>> On Fri, Aug 12, 2016 at 02:45:37PM +0200, jp charras wrote:
> >>>>>> Le 12/08/2016 à 02:32, Chris Pavlina a écrit :
> >>>>>>> I'm running into an extremely irritating UI bug with DRC on this big
> >>>>>>> board - halfway through DRC, the progress dialog is torn down and
> >>>>>>> reopened. DRC is taking two full minutes with this board, which means I
> >>>>>>> invariably do something else while it runs - and when it pops up the
> >>>>>>> second progress dialog, that dialog receives any spacebar key press I
> >>>>>>> may have been making whilst typing, cancelling DRC. I did it three times
> >>>>>>> in a row earlier today. I wanted to throw my workstation out the window.
> >>>>>>>
> >>>>>>> This patch fixes that. The DRC task creates a single progress bar dialog
> >>>>>>> and hands it to anything that needs it, keeping it open until the end.--
> >>>>>>
> >>>>>> Patch tested on W7 32 bits:
> >>>>>> The progress dialog is shown during track tests, but not during zone filling.
> >>>>>>
> >>>>>>
> >>>>>> Jean-Pierre CHARRAS
> >>>>
> >>>> Hi Chris,
> >>>>
> >>>> What is the status of your patch ?
> >>>
> >>> Nearly forgotten. So much other work to do...
> >>>
> >>>>
> >>>> On W7, 32 bits, adding
> >>>> progressDialog->Show();
> >>>> in zones_by_polygon_fill_functions.cpp, line 154 fixes this problem.
> >>>>
> >>>> This is not surprising, the progress dialog has the attribute wxPD_AUTO_HIDE, which is usual and
> >>>> correct.
> >>>> Therefore it is no more shown (but not destroyed) after the first time the max count is reached.
> >>>
> >>> Thanks for the pointer, I'll have a look. Perhaps it would be better to remove that attribute.
> >>
> >> No. I tried. It does not work.
> >> The DRC calculation is stopped when the max count is reached,
> >> and you have to close the dialog to continue.
> >> Not usable.
> > 
> > Sounds to me like if you insert ->Show() like you're suggesting, the
> > effective behavior goes back to what it was before, no? Dialog is
> > hidden, then reopened? That defeats the entire purpose.
> > 
> > Might have to look into this a bit more.
> 
> Perhaps I missed something, but I was thinking you made this patch to stop the DRC when clicking the
> Cancel button in progress bar dialog.
> 
> Without you patch, the cancel button must be clicked during the track test (stopping it) and the
> zone fill (stopping it, this is a second dialog)
> 
> With the patch + my change, only one click stops the DRC (the  progress bar dialog is not recreated).
> Calling Show() does not change the behavior.
> Previously, the progress bar dialog was existing, but just not visible.
> 
> Is it not what you are expecting with you patch?

No, that's not at all the point of this patch. I'm finding the
reopening of the progress dialog, rather than reusing the existing one,
to be exceedingly annoying on long DRCs. What happens is this:

10 I run DRC.
20 It takes a while, so I begin doing something else while it works.
21 This something else invariably involves typing.
22 This typing invariably involves pressing the space bar.
30 Track clearance test ends, and DRC destroys the progress bar and opens a new one.
31 I'm still typing.
32 The new dialog comes up too fast for me to notice and quit typing.
40 The new dialog eats a space I typed, interpreting it as 'Cancel'
50 GOTO 10

I want it to reuse the existing progress dialog so it doesn't pop up on
top of what I've switched to doing.

> 
> 
> > 
> >>
> >>>
> >>>>
> >>>> --
> >>>> Jean-Pierre CHARRAS
> >>>
> >>
> >>
> >> -- 
> >> Jean-Pierre CHARRAS
> > 
> 
> 
> -- 
> Jean-Pierre CHARRAS


References