model_server/driver_aset/src/driver.cxx
// deassigns specified style on selected objects
// if style is null, deassign visible style on
// selected objects.
deassigns specified style on selected objects
if style is null, deassign visible style on
selected objects.
deassigns specified style on selected objects if style is null deassign visible style on selected objects .
void driver::deassign_style (viewPtr v, steSlotPtr slot)
{
    Initialize(driver::deassign_style);
    start_transaction(){
	update_selection( v, 0 );
	objArr selected_nodes;
	fill_array_with_selected_appnodes( v, selected_nodes );
        appTreePtr an;
        char *nm = ( slot ) ? slot->get_name() : 0 ;
        appPtr h = NULL;
	ldrPtr lh = view_get_ldr(v);
	if ( lh )
	   h = ldr_get_app( lh );
	if (selected_nodes.size() > 0) {
	    unselect( v );
	    Obj *el1;
	    ForEach (el1, selected_nodes) {
		an = checked_cast(appTree,el1);
		style_manual_remove( an, nm, 0 );
	    }
	    if ( h ) h->set_modified();
	}else{
            OperPoint *pt = v->insertion_point();
            if (pt) {
               if (!pt->node.isnull()){
                  an = checked_cast(appTree,pt->node);
                  int res = style_manual_find_remove( an, nm, 0);
                  if ( res )
                     if (h) h->set_modified();
               }
               delete pt;
            }
        }
    } end_transaction();
}
void driver :: deassign_style ( viewPtr v , steSlotPtr slot ) { Initialize ( driver :: deassign_style ) ; start_transaction ( ) { update_selection ( v , 0 ) ; objArr selected_nodes ; fill_array_with_selected_appnodes ( v , selected_nodes ) ; appTreePtr an ; char * nm = ( slot ) ? slot -> get_name ( ) : 0 ; appPtr h = NULL ; ldrPtr lh = view_get_ldr ( v ) ; if ( lh ) h = ldr_get_app ( lh ) ; if ( selected_nodes . size ( ) > 0 ) { unselect ( v ) ; Obj * el1 ; ForEach ( el1 , selected_nodes ) { an = checked_cast ( appTree , el1 ) ; style_manual_remove ( an , nm , 0 ) ; } if ( h ) h -> set_modified ( ) ; } else { OperPoint * pt = v -> insertion_point ( ) ; if ( pt ) { if ( ! pt -> node . isnull ( ) ) { an = checked_cast ( appTree , pt -> node ) ; int res = style_manual_find_remove ( an , nm , 0 ) ; if ( res ) if ( h ) h -> set_modified ( ) ; } delete pt ; } } } end_transaction ( ) ; }
deassigns specified style on selected objects
if style is null, deassign visible style on
selected objects.
deassigns specified style on selected objects if style is null deassign visible style on selected objects .
// set app modified  --boris