SourceForge: k3d/k3d: changeset 2651:5cb8489824f3
BUG: Handle NULL selection focus correctly in NGUINodePropertiesPanel.
authorTimothy M. Shead <tshead@k-3d.com>
Mon Nov 02 22:08:00 2009 -0700 (3 weeks ago)
changeset 26515cb8489824f3
parent 2650dcef4d4796a1
child 2652ad7f4a3d4d74
BUG: Handle NULL selection focus correctly in NGUINodePropertiesPanel.
modules/ngui_node_properties_panel/panel.cpp
     1.1 --- a/modules/ngui_node_properties_panel/panel.cpp	Mon Nov 02 22:07:16 2009 -0700
     1.2 +++ b/modules/ngui_node_properties_panel/panel.cpp	Mon Nov 02 22:08:00 2009 -0700
     1.3 @@ -46,6 +46,8 @@
     1.4  #include <boost/assign/list_of.hpp>
     1.5  #include <boost/scoped_ptr.hpp>
     1.6  
     1.7 +#include <iterator>
     1.8 +
     1.9  using namespace k3d::ngui;
    1.10  
    1.11  namespace module
    1.12 @@ -94,6 +96,7 @@
    1.13  
    1.14  		// Initial update ...
    1.15  		m_nodes = selection::state(m_document_state.document()).selected_nodes();
    1.16 +
    1.17  		if(m_nodes.size() > 1)
    1.18  			m_nodes.resize(1);
    1.19  		update_connections();
    1.20 @@ -102,9 +105,8 @@
    1.21  
    1.22  	void on_view_node_properties(k3d::inode* const Node, k3d::iunknown* const Sender)
    1.23  	{
    1.24 -		m_nodes = k3d::nodes_t(1, Node);
    1.25 +		m_nodes = Node ? k3d::nodes_t(1, Node) : k3d::nodes_t();
    1.26  		update_connections();
    1.27 -		
    1.28  		schedule_update();
    1.29  	}
    1.30