update ffmpeg to 4.1, add sketcher plugin, crikey tweaks, titler colorpicker, keyfram...
[goodguy/cinelerra.git] / cinelerra-5.1 / guicast / bcpopupmenu.C
index 4c639fe27d25890f96bd4289cc77c21c651ca569..2fb69d1cb2ecd8010a8b634a07691e8f6d0409d5 100644 (file)
@@ -53,11 +53,8 @@ BC_PopupMenu::BC_PopupMenu(int x,
        highlighted = popup_down = 0;
        menu_popup = 0;
        icon = 0;
-       if(margin >= 0)
-               this->margin = margin;
-       else
-               this->margin = BC_WindowBase::get_resources()->popupmenu_margin;
-
+       this->margin = margin >= 0 ? margin :
+               BC_WindowBase::get_resources()->popupmenu_margin;
        this->use_title = use_title;
        strcpy(this->text, text);
        for(int i = 0; i < TOTAL_IMAGES; i++)
@@ -80,6 +77,7 @@ BC_PopupMenu::BC_PopupMenu(int x,
        highlighted = popup_down = 0;
        menu_popup = 0;
        icon = 0;
+       this->margin = BC_WindowBase::get_resources()->popupmenu_margin;
        this->use_title = use_title;
        strcpy(this->text, text);
        for(int i = 0; i < TOTAL_IMAGES; i++)