- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/Actions/WorldAction/SetDefaultNameAction.cpp ¶
rbcf653 rc89fb4 1 /*2 * Project: MoleCuilder3 * Description: creates and alters molecular systems4 * 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 8 1 /* 9 2 * SetDefaultNameAction.cpp … … 12 5 * Author: heber 13 6 */ 14 15 // include config.h16 #ifdef HAVE_CONFIG_H17 #include <config.h>18 #endif19 7 20 8 #include "Helpers/MemDebug.hpp" … … 74 62 75 63 defaultname = World::getInstance().getDefaultName(); 76 WorldSetDefaultNameState *UndoState = new WorldSetDefaultNameState(defaultname);77 64 ValueStorage::getInstance().queryCurrentValue(NAME, defaultname); 78 65 79 66 World::getInstance().setDefaultName(defaultname); 80 67 DoLog(0) && (Log() << Verbose(0) << "Default name of new molecules set to " << World::getInstance().getDefaultName() << "." << endl); 81 return Action::s tate_ptr(UndoState);68 return Action::success; 82 69 } 83 70 … … 87 74 string newName = World::getInstance().getDefaultName(); 88 75 World::getInstance().setDefaultName(state->lastName); 89 DoLog(0) && (Log() << Verbose(0) << "Default name of new molecules set to " << World::getInstance().getDefaultName() << "." << endl);90 76 91 77 return Action::state_ptr(new WorldSetDefaultNameState(newName));
Note:
See TracChangeset
for help on using the changeset viewer.