- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/WorldAction/SetDefaultNameAction.cpp
rc89fb4 rbcf653 1 /* 2 * Project: MoleCuilder 3 * Description: creates and alters molecular systems 4 * Copyright (C) 2010 University of Bonn. All rights reserved. 5 * Please see the LICENSE file or "Copyright notice" in builder.cpp for details. 6 */ 7 1 8 /* 2 9 * SetDefaultNameAction.cpp … … 5 12 * Author: heber 6 13 */ 14 15 // include config.h 16 #ifdef HAVE_CONFIG_H 17 #include <config.h> 18 #endif 7 19 8 20 #include "Helpers/MemDebug.hpp" … … 62 74 63 75 defaultname = World::getInstance().getDefaultName(); 76 WorldSetDefaultNameState *UndoState = new WorldSetDefaultNameState(defaultname); 64 77 ValueStorage::getInstance().queryCurrentValue(NAME, defaultname); 65 78 66 79 World::getInstance().setDefaultName(defaultname); 67 80 DoLog(0) && (Log() << Verbose(0) << "Default name of new molecules set to " << World::getInstance().getDefaultName() << "." << endl); 68 return Action::s uccess;81 return Action::state_ptr(UndoState); 69 82 } 70 83 … … 74 87 string newName = World::getInstance().getDefaultName(); 75 88 World::getInstance().setDefaultName(state->lastName); 89 DoLog(0) && (Log() << Verbose(0) << "Default name of new molecules set to " << World::getInstance().getDefaultName() << "." << endl); 76 90 77 91 return Action::state_ptr(new WorldSetDefaultNameState(newName));
Note:
See TracChangeset
for help on using the changeset viewer.