Loading common/tool/tool_manager.cpp +12 −1 Original line number Diff line number Diff line Loading @@ -137,6 +137,11 @@ struct TOOL_MANAGER::TOOL_STATE return aRhs.theTool != this->theTool; } /** * Function Push() * Stores the current state of the tool on stack. Stacks are stored internally and are not * shared between different TOOL_STATE objects. */ void Push() { stateStack.push( *this ); Loading @@ -144,6 +149,12 @@ struct TOOL_MANAGER::TOOL_STATE clear(); } /** * Function Pop() * Restores state of the tool from stack. Stacks are stored internally and are not * shared between different TOOL_STATE objects. * @return True if state was restored, false if the stack was empty. */ bool Pop() { delete cofunc; Loading Loading @@ -603,7 +614,7 @@ bool TOOL_MANAGER::SaveClipboard( const std::string& aText ) { if( wxTheClipboard->Open() ) { wxTheClipboard->SetData( new wxTextDataObject( aText ) ); wxTheClipboard->SetData( new wxTextDataObject( wxString( aText.c_str(), wxConvUTF8 ) ) ); wxTheClipboard->Close(); return true; Loading pcbnew/class_board.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -688,10 +688,12 @@ void BOARD::Add( BOARD_ITEM* aBoardItem, int aControl ) m_Status_Pcb = 0; break; case PCB_MODULE_EDGE_T: assert( false ); // TODO Orson: I am just checking if it is supposed to be here case PCB_DIMENSION_T: case PCB_LINE_T: case PCB_TEXT_T: case PCB_MODULE_EDGE_T: case PCB_TARGET_T: if( aControl & ADD_APPEND ) m_Drawings.PushBack( aBoardItem ); Loading pcbnew/ratsnest_data.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -305,7 +305,7 @@ void RN_NET::clearNode( const RN_NODE_PTR& aNode ) // Remove all ratsnest edges for associated with the node newEnd = std::remove_if( m_rnEdges->begin(), m_rnEdges->end(), boost::bind( isEdgeConnectingNode, _1, aNode ) ); boost::bind( isEdgeConnectingNode, _1, boost::ref( aNode ) ) ); m_rnEdges->resize( std::distance( m_rnEdges->begin(), newEnd ) ); } Loading Loading @@ -629,7 +629,7 @@ std::list<RN_NODE_PTR> RN_NET::GetClosestNodes( const RN_NODE_PTR& aNode, int aN closest.push_back( node ); // Sort by the distance from aNode closest.sort( boost::bind( sortDistance, aNode, _1, _2 ) ); closest.sort( boost::bind( sortDistance, boost::ref( aNode ), _1, _2 ) ); // Remove the first node (==aNode), as it is surely located within the smallest distance closest.pop_front(); Loading @@ -653,7 +653,7 @@ std::list<RN_NODE_PTR> RN_NET::GetClosestNodes( const RN_NODE_PTR& aNode, closest.push_back( node ); // Sort by the distance from aNode closest.sort( boost::bind( sortDistance, aNode, _1, _2 ) ); closest.sort( boost::bind( sortDistance, boost::ref( aNode ), _1, _2 ) ); // Remove the first node (==aNode), as it is surely located within the smallest distance closest.pop_front(); Loading pcbnew/tools/edit_tool.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -483,7 +483,7 @@ int EDIT_TOOL::PasteItems( TOOL_EVENT& aEvent ) try { BOARD_ITEM* item = io.Parse( m_toolMgr->GetClipboard() ); BOARD_ITEM* item = io.Parse( wxString( m_toolMgr->GetClipboard().c_str(), wxConvUTF8 ) ); assert( item->Type() == PCB_MODULE_T ); pastedModule = dyn_cast<MODULE*>( item ); } Loading Loading
common/tool/tool_manager.cpp +12 −1 Original line number Diff line number Diff line Loading @@ -137,6 +137,11 @@ struct TOOL_MANAGER::TOOL_STATE return aRhs.theTool != this->theTool; } /** * Function Push() * Stores the current state of the tool on stack. Stacks are stored internally and are not * shared between different TOOL_STATE objects. */ void Push() { stateStack.push( *this ); Loading @@ -144,6 +149,12 @@ struct TOOL_MANAGER::TOOL_STATE clear(); } /** * Function Pop() * Restores state of the tool from stack. Stacks are stored internally and are not * shared between different TOOL_STATE objects. * @return True if state was restored, false if the stack was empty. */ bool Pop() { delete cofunc; Loading Loading @@ -603,7 +614,7 @@ bool TOOL_MANAGER::SaveClipboard( const std::string& aText ) { if( wxTheClipboard->Open() ) { wxTheClipboard->SetData( new wxTextDataObject( aText ) ); wxTheClipboard->SetData( new wxTextDataObject( wxString( aText.c_str(), wxConvUTF8 ) ) ); wxTheClipboard->Close(); return true; Loading
pcbnew/class_board.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -688,10 +688,12 @@ void BOARD::Add( BOARD_ITEM* aBoardItem, int aControl ) m_Status_Pcb = 0; break; case PCB_MODULE_EDGE_T: assert( false ); // TODO Orson: I am just checking if it is supposed to be here case PCB_DIMENSION_T: case PCB_LINE_T: case PCB_TEXT_T: case PCB_MODULE_EDGE_T: case PCB_TARGET_T: if( aControl & ADD_APPEND ) m_Drawings.PushBack( aBoardItem ); Loading
pcbnew/ratsnest_data.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -305,7 +305,7 @@ void RN_NET::clearNode( const RN_NODE_PTR& aNode ) // Remove all ratsnest edges for associated with the node newEnd = std::remove_if( m_rnEdges->begin(), m_rnEdges->end(), boost::bind( isEdgeConnectingNode, _1, aNode ) ); boost::bind( isEdgeConnectingNode, _1, boost::ref( aNode ) ) ); m_rnEdges->resize( std::distance( m_rnEdges->begin(), newEnd ) ); } Loading Loading @@ -629,7 +629,7 @@ std::list<RN_NODE_PTR> RN_NET::GetClosestNodes( const RN_NODE_PTR& aNode, int aN closest.push_back( node ); // Sort by the distance from aNode closest.sort( boost::bind( sortDistance, aNode, _1, _2 ) ); closest.sort( boost::bind( sortDistance, boost::ref( aNode ), _1, _2 ) ); // Remove the first node (==aNode), as it is surely located within the smallest distance closest.pop_front(); Loading @@ -653,7 +653,7 @@ std::list<RN_NODE_PTR> RN_NET::GetClosestNodes( const RN_NODE_PTR& aNode, closest.push_back( node ); // Sort by the distance from aNode closest.sort( boost::bind( sortDistance, aNode, _1, _2 ) ); closest.sort( boost::bind( sortDistance, boost::ref( aNode ), _1, _2 ) ); // Remove the first node (==aNode), as it is surely located within the smallest distance closest.pop_front(); Loading
pcbnew/tools/edit_tool.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -483,7 +483,7 @@ int EDIT_TOOL::PasteItems( TOOL_EVENT& aEvent ) try { BOARD_ITEM* item = io.Parse( m_toolMgr->GetClipboard() ); BOARD_ITEM* item = io.Parse( wxString( m_toolMgr->GetClipboard().c_str(), wxConvUTF8 ) ); assert( item->Type() == PCB_MODULE_T ); pastedModule = dyn_cast<MODULE*>( item ); } Loading