]> Shamusworld >> Repos - architektonas/blobdiff - src/base/actioninterface.cpp
Removed Snapper class; still refactoring Snapper/Preview...
[architektonas] / src / base / actioninterface.cpp
index 17d1da9f3ba958e95fdeeb77099f5936eb5bdf2a..1b4d5d8171303c46f9658943b82853a27675bf4a 100644 (file)
@@ -30,6 +30,8 @@ I think what's needed here is for the constructor to save the state of the snapp
 and to restore it in the destructor. This, of course, assumes that the actions are
 created and used in a certain order, perhaps that needs enforcement? Dunno, but worth
 a try as suspend() and resume() seem to fuck it up badly.
+#define _ASSUAN_DEPRECATED  __attribute__ ((__deprecated__))
+on MS it's: __declspec(deprecated)
 */
 
 /**
@@ -51,6 +53,11 @@ ActionInterface::ActionInterface(const char * name, EntityContainer & ec,
 {
        DEBUG->print("ActionInterface::ActionInterface: Setting up action: \"%s\"", name);
 
+//This doesn't work properly; not sure why that is...
+//Actually, it's working perfectly. Now we just need to propagate the fixes everywhere. :-/
+       // We'll use snapperVisibility for the save/restore functionality...
+       snapperVisibility = graphicView->SnapperVisible();
+
        this->name = name;
        status = 0;
        finished = false;
@@ -63,6 +70,7 @@ ActionInterface::ActionInterface(const char * name, EntityContainer & ec,
        document = ec.getDocument();
 
        // \o/ \o/ \o/ BY GRABTHAR'S HAMMER, IT HAS BEEN EXPUNGED!!! \o/ \o/ \o/
+
        // This is here until I can figure out a better way to contain all of this
        // circular referential nonsense that exists in this codebase. It will be
        // expunged, by Grabthar's Hammer!
@@ -75,7 +83,7 @@ ActionInterface::ActionInterface(const char * name, EntityContainer & ec,
        graphicView->preview.SetVisible();
 
        DEBUG->print("ActionInterface::ActionInterface: Setting up action: \"%s\": OK", name);
-printf("ActionInterface::ActionInterface() [%08X]\n", this);
+//printf("ActionInterface::ActionInterface() [%08X]\n", this);
 }
 
 /**
@@ -86,7 +94,10 @@ printf("ActionInterface::ActionInterface() [%08X]\n", this);
        // would be pure virtual now:
        // hideOptions();
 //JLH: Only it isn't pure virtual...
-printf("ActionInterface::~ActionInterface() [%08X]\n", this);
+//printf("ActionInterface::~ActionInterface() [%08X]\n", this);
+
+       // We'll use snapperVisibility for the save/restore functionality...
+       graphicView->SetSnapperVisible(snapperVisibility);
 }
 
 /**
@@ -316,6 +327,9 @@ void ActionInterface::finish()
        // hm.
 //     graphicView->snapper.SetVisible(false);
        graphicView->SetSnapperVisible(false);
+//Short circuit the destructor fuxoring with this:
+//snapperVisibility = false;
+//Only it causes other stuff to be fuxorred... Grr... Not sure how to fix this...
        graphicView->preview.SetVisible(false);
 //     graphicView->preview.clear();
        graphicView->redraw();  //hm.