From: Braden M. <br...@us...> - 2007-06-01 06:28:18
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv5202/src/libopenvrml/openvrml Modified Files: browser.cpp Log Message: Sending TRUE to the newly-active Viewpoint's set_bind is handled in during initialization of the viewpoint_node implementation's metatype; we don't need to do it again. Index: browser.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.cpp,v retrieving revision 1.218 retrieving revision 1.219 diff -C2 -d -r1.218 -r1.219 *** browser.cpp 1 Jun 2007 06:08:44 -0000 1.218 --- browser.cpp 1 Jun 2007 06:28:12 -0000 1.219 *************** *** 6148,6154 **** { { ! read_write_mutex::scoped_write_lock ! scene_lock(this->scene_mutex_), ! active_viewpoint_lock(this->active_viewpoint_mutex_); using std::for_each; --- 6148,6152 ---- { { ! read_write_mutex::scoped_write_lock scene_lock(this->scene_mutex_); using std::for_each; *************** *** 6169,6174 **** browser_event(*this, browser_event::shutdown))); this->scene_.reset(); - this->active_viewpoint_ = - node_cast<viewpoint_node *>(this->default_viewpoint_.get()); assert(this->viewpoint_list_.empty()); assert(this->scoped_lights_.empty()); --- 6167,6170 ---- *************** *** 6212,6230 **** this->node_metatype_map_.init(initial_viewpoint, now); ! if (this->active_viewpoint_ ! != node_cast<viewpoint_node *>(this->default_viewpoint_.get())) { ! // XXX ! // XXX Fix openvrml::viewpoint_node so that we don't have to get an ! // XXX event_listener here. ! // XXX ! event_listener & listener = ! this->active_viewpoint_->event_listener("set_bind"); ! dynamic_cast<sfbool_listener &>(listener) ! .process_event(sfbool(true), now); } this->modified(true); this->new_view = true; // Force resetUserNav ! } // unlock this->mutex_, this->listeners_mutex_ read_write_mutex::scoped_read_lock --- 6208,6220 ---- this->node_metatype_map_.init(initial_viewpoint, now); ! if (!this->active_viewpoint_) { ! read_write_mutex::scoped_write_lock ! lock(this->active_viewpoint_mutex_); ! this->active_viewpoint_ = this->default_viewpoint_.get(); } this->modified(true); this->new_view = true; // Force resetUserNav ! } // unlock this->scene_mutex_, this->active_viewpoint_mutex_ read_write_mutex::scoped_read_lock |