SasView / sasview

Code for the SasView application.
BSD 3-Clause "New" or "Revised" License
48 stars 41 forks source link

The "display magnetic angles" feature of the 2D magnetic model does not work. #2088

Open JoGaudet opened 2 years ago

JoGaudet commented 2 years ago

Within the fit panel, we can select the 2D and magnetism options that "magnetize" selected models. Within the magnetism tab, there's the option to "display magnetic angles" but it does not appear after clicking on that option. After trying on few machines, this bug seems to appear both on mac and pc.

krzywon commented 2 years ago

I tested this on Windows. The magnetic angles window opens using an installed version of v5.0.5, but does not when running directly from source using the main branch. I don't see any errors in the console or the sasview.log file on failure.

JoGaudet commented 2 years ago

Same for mac. I do not see any errors in the console. I noted that the file path for it is defined in GuiUtils.py by the variable "IMAGES_DIRECTORY_LOCATION", which points into a folder that does not exist (at least for my mac version v5.0.5).

krzywon commented 2 years ago

That constant is pointing to the docs build directory. That suggests neither of us has built the docs.

I was able to get it to work again after I followed the wiki instructions on how to build the docs.

rozyczko commented 2 years ago

The location of this image differs in dev build and installation. We can potentially modify the code so IMAGES_DIRECTORY_LOCATION depends on the type of the current build. I think this is done elsewhere for HELP_DIRECTORY_LOCATION, so we can open doc HTML files in both.

butlerpd commented 1 year ago

Is this something we should keep open as todo? or are we happy that this has been resolved and should close the issue? @rozyczko @krzywon @JoGaudet ?

juliuskarliczek commented 4 months ago

if not MAIN_DOC_SRC.exists() and not HELP_DIRECTORY_LOCATION.exists(): This is already implemented in a similar way in DocViewWidget.py, as Piotr mentioned Then the image source could be fetched from sas/src/qtgui/MainWindow/media