Logo Search packages:      
Sourcecode: ardour version File versions

void ImageFrameSocketHandler::handle_rename_imageframe_time_axis ( const char *  msg  )  [private]

Handle the renaming of an ImageTimeAxis

Parameters:
msg the received message

Definition at line 1517 of file imageframe_socket_handler.cc.

References get_message_part(), send_return_failure(), send_return_success(), VisualTimeAxis::set_time_axis_name(), and thePublicEditor.

Referenced by handle_rename_message().

{
      // msg [MVIT][oldSize][oldId][newSize][newId]
      
      int position = 4 ; // message type chars

      // get the old Id size
      int old_id_size = atoi(get_message_part(position,3,msg).c_str()) ;
      position += 3 ;
      
      // get the old id
      std::string old_id = get_message_part(position,old_id_size,msg) ;
      position += old_id_size ;
      
      //get the new Id size
      int new_id_size = atoi(get_message_part(position,3,msg).c_str()) ;
      position += 3 ;
      
      // get the new Id
      std::string new_id = get_message_part(position,new_id_size,msg) ;
      position += new_id_size ;
      
      // get the Named time axis
      TimeAxisView* tav = thePublicEditor.get_named_time_axis(old_id) ;
      if(dynamic_cast<ImageFrameTimeAxis*>(tav))
      {
            ImageFrameTimeAxis* ifta = dynamic_cast<ImageFrameTimeAxis*>(tav) ;
            ifta->set_time_axis_name(new_id, this) ;
            send_return_success() ;
      }
      else
      {
            std::string msg = "No Image Track Found: " ;
            msg.append(old_id) ;
            send_return_failure(msg) ;
      }
}


Generated by  Doxygen 1.6.0   Back to index