Q:

Pygame does not display the last changes

So, I have my figure which I can navigate around my map in a turnbased fashion.  I click on the figure, then on a new location and the figure moves to that position (instantly, no running animations or such).  Now if the figure encounters something in its way, I want it to stop and make pygame display a window.  While the window is open I want everything in the background to stop, so that I can not move my figure (for example) during that time.  I want the window disappears after I click on a button.  This is how I did it:
    if char.colided:
        DISPLAYSURFACE.blit(window,(5*TILESIZE,8*TILESIZE,200,400))
        but_OK=Button('OK', 12*TILESIZE, 9*TILESIZE, 80, 40)
        but_OK.draw()
        a=False
        while not a:
            pygame.event.clear()
            for event in pygame.event.get():
                if event.type == pygame. MOUSEBUTTONDOWN:
                    if but_OK.check_click(event.pos):
                        a=True
        char.colided=False

It works all fine but the problem is, that as soon as I make the move that collides my figure with an object or another figure, pygame does not display that anymore.  That means I enter the while loop but on the screen my figure did not move and the window did not pop up.  The changes first appear after I "hide" (like for example minimize) the pygame window.  The only way I could think of to avoid that, would be to display everything again in the while loop but it is quite a lot of stuff so I would like to avoid that if possible.  If necessary I can also send the rest of the code but I did not want to do it just now, since those are almost 400 lines and I dont really know which part is important in this context

A:

No matter what state your game is in you need to handle 3 things in the event loop.  One handle events, two update state, three draw and flip the screen. 
In your dialog box state event loop you are mostly handling events.   You are updating the "state" of the dialog (not allot to update since its a dialog box where the game itself is paused).   However, you are not drawing or updating the screen.   You do draw some stuff before you enter the loop, which means only the first frame would have the dialog box, but you aren't ever calling to flip the screen.  So you don't even get that one frame.