Menu

#2175 loading vap file resets scientist's default colors

nextrelease
closed-fixed
nobody
None
5
2019-09-30
2019-06-12
No

When a .vap is loaded the scientist's default colors are reset to those of the .vap. This is because there is only one place in the .vap where the foreground and background colors are stored.

The canvas node should have background and foreground colors, which can be different than the options. The options should only be used when a new vap is started, copying values out to the canvas node. This is also the case for the font, but I did notice that the canvas node already has a font property, but this logic was not implemented.

Discussion

  • Jeremy Faden

    Jeremy Faden - 2019-06-13

    I've added the properties to the canvas node, but I'll hold off switching over to it completely. This is not a trivial thing, and I need to think about how this is going to work.

    The "vap" is more than just a current state. The options can do things like flip on the timerange editor, so the options really are owned by the vap file. It's a weird mix between such properties and those which clearly aren't owned by the vap file, like whether the script editor should be showing. See Options#syncTo(n,exclude) to see the subset which are loaded when a .vap is loaded.

     
  • Jeremy Faden

    Jeremy Faden - 2019-06-13

    Desired workflow:

    1. the scientist prefers a black background.
    2. a vap is loaded with a white background.
    3. the scientist does File->reset
    4. Autoplot returns to black background.

    Present workflow:

    1. the scientist prefers a black background.
    2. a vap is loaded with a white background.
    3. the scientist does File->reset
    4. reset doesn't affect the background and the scientists "options" is white background.
     
  • Jeremy Faden

    Jeremy Faden - 2019-06-14

    After starting this I was reminded that the options are the options for the vap, and these are polluted with the scientist's personal options. I think there should be a set of options which is stored in the scientist's autoplot_data/config directory, and reset will grab options from here.

     
  • Jeremy Faden

    Jeremy Faden - 2019-06-14

    Another lingering problem is that some preferences are stored using Java Prefs, so when a scientist switches laptops they loose all their settings. All prefs should be stored within the autoplot_data/config directory. I'd suggest:

    options.preferences -- a copy of all the scientist's vap preferences to use upon reset

    Things that are truly machine-specific, such as file references, such as the last exported file location, should be left in prefs.

     
  • Jeremy Faden

    Jeremy Faden - 2019-06-25

    Also font size and type are reset by .vap files.

     
  • Jeremy Faden

    Jeremy Faden - 2019-07-10

    I think the size of the .vap (height and width in pixels) is probably changed as well.

     
  • Jeremy Faden

    Jeremy Faden - 2019-08-09

    I'm also migrating the preferences to autoplot_data/config/options.properties, with the idea that I'll start using this file as the primary source after a couple of production releases. Note I did a similar migration from org.virbo.autoplot.dom to org.autoplot.dom, but I never flipped over to using the new name as the primary source.

     

    Last edit: Jeremy Faden 2019-08-09
  • Jeremy Faden

    Jeremy Faden - 2019-08-12

    I notice now, somehow I hadn't before, that the .vap also resets the application size. So I'm going to add this to the properties saved to be handled the same way the font size is.

     
  • Jeremy Faden

    Jeremy Faden - 2019-08-28

    Right-click copy plot, then right-click paste plot messes up the background color of the plot, making it black. I added the background color to the plot, finally, thinking it was a low-impact feature that would help with an analysis on campus, and there's a bug.

     

    Last edit: Jeremy Faden 2019-08-29
  • Jeremy Faden

    Jeremy Faden - 2019-08-29

    Regarding the black backgrounds, there's a bug where the persistent representation of black is the same as transparent. These representations need to be reviewed. George commented that this is affecting him as well.

     

    Last edit: Jeremy Faden 2019-08-29
  • Jeremy Faden

    Jeremy Faden - 2019-08-29

    The vap size is not being set reliably. I noticed that vertical size was being reset during window resizing, but the horizontal was not reset until the mouse stopped moving. Very weird...

     
  • Jeremy Faden

    Jeremy Faden - 2019-08-29

    I'm extracting the transparent color problem into its own bug. See https://sourceforge.net/p/autoplot/bugs/2200/

     
  • Jeremy Faden

    Jeremy Faden - 2019-09-09

    I've extracted the size problem to its own ticket, https://sourceforge.net/p/autoplot/bugs/2202/.

     
  • Jeremy Faden

    Jeremy Faden - 2019-09-30
    • status: open --> closed-fixed
     
  • Jeremy Faden

    Jeremy Faden - 2019-09-30

    All tickets are fixed now.

     
MongoDB Logo MongoDB