refresh frame fix, dblclk proxy viewer fix, vicon refresh fix for awdw resize, fix...
[goodguy/history.git] / cinelerra-5.1 / guicast / vicon.C
index 1f80bc470c40799c84067557e1938ba769ff4591..9c41ccf1ea915d20548a0f755f6676ea92249abe 100644 (file)
@@ -43,6 +43,8 @@ add_image(VFrame *frm, int ww, int hh, int vcmdl)
 void VIcon::
 draw_vframe(VIconThread *vt, BC_WindowBase *wdw, int x, int y)
 {
+       VFrame *vfrm = frame();
+       if( !vfrm ) return;
        int sx0 = 0, sx1 = sx0 + vt->view_w;
        int sy0 = 0, sy1 = sy0 + vt->view_h;
        int dx0 = x, dx1 = dx0 + vw;
@@ -54,7 +56,7 @@ draw_vframe(VIconThread *vt, BC_WindowBase *wdw, int x, int y)
        int sw = sx1 - sx0, sh = sy1 - sy0;
        int dw = dx1 - dx0, dh = dy1 - dy0;
        if( dw > 0 && dh > 0 && sw > 0 && sh > 0 )
-               wdw->draw_vframe(frame(), dx0,dy0, dw,dh, sx0,sy0, sw,sh);
+               wdw->draw_vframe(vfrm, dx0,dy0, dw,dh, sx0,sy0, sw,sh);
 }
 
 void VIconThread::
@@ -184,6 +186,7 @@ ViewPopup::~ViewPopup()
 
 void ViewPopup::draw_vframe(VFrame *frame)
 {
+       if( !frame ) return;
        BC_WindowBase::draw_vframe(frame, 0,0, get_w(),get_h());
 }
 
@@ -287,6 +290,14 @@ draw(VIcon *vicon)
        return 1;
 }
 
+void VIconThread::hide_vicons(int v)
+{
+       for( int i=0; i<t_heap.size(); ++i ) {
+               t_heap[i]->hidden = v;
+               t_heap[i]->age = 0;
+       }
+}
+
 void VIconThread::
 run()
 {