Compare commits
1 Commits
master
...
betterClea
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ae12000063 |
@ -23,7 +23,10 @@ void init()
|
||||
|
||||
void clear()
|
||||
{
|
||||
undoStack->clear();
|
||||
// this can get called from C code even if the Command code was never initialized
|
||||
// (really only in the case of tests like TestParse)
|
||||
if (undoStack)
|
||||
undoStack->clear();
|
||||
}
|
||||
|
||||
void setClean()
|
||||
@ -113,3 +116,9 @@ bool placingCommand()
|
||||
}
|
||||
|
||||
} // namespace Command
|
||||
|
||||
extern "C" {
|
||||
void command_clear_from_C() {
|
||||
Command::clear();
|
||||
}
|
||||
}
|
||||
|
||||
@ -21,6 +21,7 @@
|
||||
#include "trip.h"
|
||||
|
||||
bool autogroup = false;
|
||||
extern void command_clear_from_C();
|
||||
|
||||
void set_autogroup(bool value)
|
||||
{
|
||||
@ -1391,6 +1392,7 @@ void clear_dive_file_data()
|
||||
clear_git_id();
|
||||
|
||||
reset_tank_info_table(&tank_info_table);
|
||||
command_clear_from_C();
|
||||
|
||||
/* Inform frontend of reset data. This should reset all the models. */
|
||||
emit_reset_signal();
|
||||
|
||||
@ -64,6 +64,8 @@ function(TEST NAME FILE)
|
||||
subsurface_backend_shared
|
||||
${TEST_SPECIFIC_LIBRARIES}
|
||||
subsurface_corelib
|
||||
subsurface_commands
|
||||
subsurface_corelib # annoying circular references
|
||||
RESOURCE_LIBRARY
|
||||
${QT_TEST_LIBRARIES}
|
||||
${SUBSURFACE_LINK_LIBRARIES}
|
||||
@ -99,6 +101,8 @@ add_executable(TestQML testqml.cpp)
|
||||
target_link_libraries(
|
||||
TestQML
|
||||
subsurface_corelib
|
||||
subsurface_commands
|
||||
subsurface_corelib # annoying circular references
|
||||
RESOURCE_LIBRARY
|
||||
${QT_TEST_LIBRARIES}
|
||||
${SUBSURFACE_LINK_LIBRARIES}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user