Minor bug?: disabling virtual cache programmatically -> title bar not changed

Home Forums Bug Reports Minor bug?: disabling virtual cache programmatically -> title bar not changed

  • Frederic Marion-Poll

    In order to disable the virtual cache globally (because it interferes with my old plugins and it is easier to inactivate it rather than hunting down all locations where we should call get ), I tried to inactivate the virtual cache programmatically. I insert the following command as the first line of run() of the old plugin:

    Icy.getMainInterface().getMainFrame().getInspector().imageCacheDisabled();

     

    This works well (the button is greyed and virtual mode is inactivated). However, the main title bar is not changed (both under Eclipse debug and when running Icy directly). When debugging this call, it leads to MainFrame.java “refreshTitle” and to the line:

    final String virtual = ImageCache.isEnabled() && GeneralPreferences.getVirtualMode() ? ” (virtual mode)” : “”;

    The result of this test is “(virtual mode)”.

     

    fred

    Frederic Marion-Poll

    Solution found: call setVirtualMode just before:

    Icy.getMainInterface().getMainFrame().getInspector().setVirtualMode(false);
    Icy.getMainInterface().getMainFrame().getInspector().imageCacheDisabled();

    Stephane Dallongeville

    Thanks for reporting, i made a minor change so it should correctly update the title even using imageCacheDisabled() method alone.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.