Skip to content

Commit

Permalink
Fix for issue #17
Browse files Browse the repository at this point in the history
alpharesearche's fix for issue #17.
  • Loading branch information
brad committed Aug 31, 2012
1 parent 889cb0e commit a3244b2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
5 changes: 3 additions & 2 deletions src/Profile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1029,7 +1029,8 @@ class AddTagTool: public Tool
{
heeksCAD->CreateUndoPoint();
CTag* new_object = new CTag();
object_for_tools->Tags()->Add(new_object, NULL);
CTags* temp = object_for_tools->Tags();
temp->Add(new_object, NULL);
heeksCAD->Changed();
heeksCAD->ClearMarkedList();
heeksCAD->Mark(new_object);
Expand Down Expand Up @@ -1392,4 +1393,4 @@ bool CProfile::operator==( const CProfile & rhs ) const
#endif

return(CDepthOp::operator==(rhs));
}
}
10 changes: 5 additions & 5 deletions src/Tag.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ CTag::CTag( const CTag & rhs ) : HeeksObj(rhs)
m_angle = rhs.m_angle;
m_height = rhs.m_height;
}


CTag& CTag::operator= ( const CTag & rhs )
{
if (this != &rhs)
Expand Down Expand Up @@ -77,7 +77,7 @@ void CTag::GetProperties(std::list<Property *> *list)

static CTag* object_for_tools = NULL;

class PickPos: public Tool{
class PickPos2: public Tool{
public:
// Tool's virtual functions
const wxChar* GetTitle(){return _("Pick position");}
Expand All @@ -94,12 +94,12 @@ class PickPos: public Tool{
wxString BitmapPath(){ return _T("tagpos");}
};

static PickPos pick_pos;
static PickPos2 pick_pos2;

void CTag::GetTools(std::list<Tool*>* t_list, const wxPoint* p)
{
object_for_tools = this;
t_list->push_back(&pick_pos);
t_list->push_back(&pick_pos2);

}

Expand Down Expand Up @@ -158,5 +158,5 @@ bool CTag::operator==( const CTag & rhs ) const
void CTag::PickPosition(CTag* tag)
{
object_for_tools = tag;
pick_pos.Run();
pick_pos2.Run();
}

0 comments on commit a3244b2

Please sign in to comment.