DeepSOIC / Part-o-magic

Experiment on FreeCAD-wide automation of Part container management. For FC v0.17-0.18
Other
12 stars 4 forks source link

Didn't deactivate active container popup window #42

Closed leoheck closed 4 years ago

leoheck commented 4 years ago

Is it possible to remove this window?

I save my designs very often, and I see this so much, it is annoying to have to click that every time. You can add a message to the Report View if this is important.

image

DeepSOIC commented 4 years ago

Version? In 0.19, it shouldn't pop up, as the issue is solved there. https://github.com/DeepSOIC/Part-o-magic/issues/32 commit 973e7a5a86a69d866d3fda75d8d0dc21053049a4

leoheck commented 4 years ago

Yeah, it is 0.19. Maybe because it didn't detect the whole version as I referenced in another issue.

image

DeepSOIC commented 4 years ago

Can you please paste this to console and tell what happens (i.e., what is printed as a response):

PartOMagic.Base.Compatibility.tempovis_is_stacky()
leoheck commented 4 years ago

Sure, it is returning true, anything else?

image

DeepSOIC commented 4 years ago

hmm, that doesn't make sense at all, because

    def slotSavedDocument(self, doc): #emulated - called by polling timer when LastModifiedDate of document changes
        ...
        from PartOMagic.Base.Compatibility import tempovis_is_stacky
        if tempovis_is_stacky():
            return
        from PySide import QtGui
        mb = QtGui.QMessageBox()
        mb.setIcon(mb.Icon.Warning)
        mb.setText("It looks like you've just saved your project, but didn't deactivate active container. \n\n"...)

Can you post a step-by-step guide for absolute idiots on how to reproduce it?

leoheck commented 4 years ago

Sure

I use to open files from the terminal so (with version 0.19) freecad-daily file.FCStd

I tested this, now, and nothing happens, it looks good.

But sometimes, I open it just by clicking in the file, (this loads 0.18.4, for me)

Doing the same with the same file, looks good too.

Maybe it happens in a new/old/different file. For some reason, I couldn't reproduce it again now.

I will come back when I have a procedure that generates the issue again.

leoheck commented 4 years ago

Now I know.

Create a new file, (I am using 0.18.4) and start working on it.

And then this happens.

image

If I click fix and resave, it enables the Origin. I disable it because it is annoying. Then I hit Ctrl+s again because I always work saving everything I do... The same happens.

leoheck commented 4 years ago

Sincerely, I forgot to double-check the plugin version in both Freecad versions. Maybe this is my issue, I will verify that when I have a chance.

DeepSOIC commented 4 years ago

There is a small chance it may be caused by leftover TempoVis.py in Mod/Show (where FC is installed). It was removed from FreeCAD source code (renamed to mTempoVis.py), but it may not be deleted when updating the installation. Its presence is usually not a problem, but in a very special case, where you open a project that was saved by older version of FreeCAD while a sketch was open, it is known to mess up opening sketches for the lifetime of the FC application instance. But I think it shouldn't be affecting this particular aspect of Part-o-magic (other aspects will be, because PoM heavily uses TempoVis).

leoheck commented 4 years ago

Hm interesting, I checked that and this is not the case. I am using the latest version of the plugin now, everything looks great. Thanks for your patience.