|
wxMaxima
|
Regression tests for which toolbar buttons are active. More...
#include <wx/app.h>#include <wx/artprov.h>#include <wx/fileconf.h>#include <wx/frame.h>#include <wx/log.h>#include "ToolBar.h"#include "wxMaximaArtProvider.h"#include <catch2/catch.hpp>Data Structures | |
| class | TestApp |
Functions | |
| SCENARIO ("Undo and Redo are activated independently") | |
| SCENARIO ("Re-creating the tools doesn't leave them wrongly active") | |
| SCENARIO ("The Select All button selects all instead of hiding the code") | |
| wxDECLARE_APP (TestApp) | |
| int | main (int argc, char **argv) |
Regression tests for which toolbar buttons are active.
ToolBar::CanRedo() used to enable or disable the Undo button, so Redo never changed state and Undo followed whichever of the two was set last. And ToolBar remembers the last state it set each button to, to skip redundant updates: re-creating the tools (which the toolbar does when the user shows or hides a group of buttons via its context menu) enabled them all again without resetting that memory, so a button could stay active with nothing to act on.