]> Shamusworld >> Repos - architektonas/blobdiff - src/base/actioninterface.cpp
First steps in fixing/cleaning up preview/snapper rendering.
[architektonas] / src / base / actioninterface.cpp
index b62b57869a8c2841342fb2ce6af8e7d1a211ecea..9f38848e2df778ae588dc33ab3dfb9dee8e2435d 100644 (file)
@@ -58,6 +58,8 @@ ActionInterface::ActionInterface(const char * name, RS_EntityContainer & c,
        // expunged, by Grabthar's Hammer!
        graphicView->snapper.SetContainer(container);
        graphicView->snapper.SetGraphicView(graphicView);       // <-- THIS is what I mean! INSANE!
+       graphicView->snapper.SetVisible();
+       graphicView->preview.SetVisible();
 
        RS_DEBUG->print("ActionInterface::ActionInterface: Setting up action: \"%s\": OK", name);
 }
@@ -109,6 +111,11 @@ void ActionInterface::init(int status/*= 0*/)
                updateMouseCursor();
                updateToolBar();
        }
+       else    // status < 0, e.g. this action is finished
+       {
+               graphicView->snapper.SetVisible(false);
+               graphicView->preview.SetVisible(false);
+       }
 }
 
 /**