BUGGraphHacktoberFestgood first issue
Description
Environment information
- Operating System: Any
- Cutter version: latest - master
- File format: Any
Describe the bug
There are actually two related bugs:
- When changing the graph layout to another layout and restarting Cutter. The graph layout is back to its default value. Cutter should preserve the user's preferences.
- After changing the graph layout and clicking "Reset Settings", the layout stays changed until Cutter is re-opened. I'd expect the layout to be reset to its default layout when resetting settings and don't wait for the restart to take effect.
To Reproduce
Scenario 1: 0. Open a binary in Cutter
- Open the Graph widget
- Right-click on the graph, and select a layout from the Layout context item. e.g "Graphviz polyline LR"
- Exit Cutter
- Re-open Cutter and go to the graph widget
- See that the graph returned to its default layout
Scenario 2: 0. Open a binary in Cutter
- Open the Graph widget
- Right-click on the graph, and select a layout from the Layout context item. e.g "Graphviz polyline LR"
- See that the graph layout has changed
- Now select "View -> Reset Settings" from the main toolbar
- Inspect that the graph did not change to its default layout
- Restart Cutter and open a binary. See that the layout returned to default Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior
The chosen layout should be saved in Settings, preserved in each execute of Cutter, and return to its Default layout when the settings are reset.