Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot Add Tags With Ubuntu #17

Closed
urbnsr opened this issue Oct 12, 2011 · 4 comments
Closed

Cannot Add Tags With Ubuntu #17

urbnsr opened this issue Oct 12, 2011 · 4 comments

Comments

@urbnsr
Copy link

urbnsr commented Oct 12, 2011

We still cannot add tags to profiles using Ubuntu 11.04, 32bit. Pulled source via git 10.Oct.11 following instructions for Ubuntu in file: INSTALL_UBUNTU.README. When attempting to add a tag, program dies with:

pure virtual method called
terminate called without an active exception
Aborted

My Windows installation adds tags without errors. Tags added with Windows can be opened and display correctly with Ubuntu, but program will die again if tag modification is attempted.

@urbnsr
Copy link
Author

urbnsr commented Nov 8, 2011

This issue doesn't seem to attract much attention, so is there a way to run an older (working tags) version under the latest Ubuntu? Thanks...
Re:
http://code.google.com/p/heekscnc/issues/detail?id=316

@alpharesearch
Copy link

This is still an issue today (Linux Mint 13)... I don't see why this works with windows and not with linux? looks like any other function??

@alpharesearch
Copy link

Here is the fix I found for the tag issues, this works under Mint 13 64bit...

commit fbb6ee30a9b4cf53b704d1998cfe7f37a7a5d83f
Author: Markus Schulz
Date:   Thu Aug 30 17:25:04 2012 -0400

    tag fix for linux

diff --git a/src/Profile.cpp b/src/Profile.cpp
index 9f9d112..8f01e5c 100755
--- a/src/Profile.cpp
+++ b/src/Profile.cpp
@@ -1042,7 +1042,8 @@ public:
    {
        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);
diff --git a/src/Tag.cpp b/src/Tag.cpp
index 5b53f8a..abd6dd2 100644
--- a/src/Tag.cpp
+++ b/src/Tag.cpp
@@ -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{
    // Tool's virtual functions
    const wxChar* GetTitle(){return _("Pick position");}
    void Run(){
@@ -88,12 +88,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);

 }

Looks like two issues caused the bug:

  1. in the debugger this was listed as a CProfile object but this needs to be a CTags object (Profile.cpp)
  2. looks like there is another PickPos class in heekscad it self and it was resolving the wrong path and went all the way to the pure virtual class (Tag.cpp)

sliptonic pushed a commit that referenced this issue Aug 31, 2012
alpharesearche's fix for issue #17.
@sliptonic
Copy link
Contributor

Confirmed fix and pushed to master.

sliptonic pushed a commit that referenced this issue Aug 31, 2012
alpharesearche's fix for issue #17.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants