- File:
-
- 1 edited
-
src/Actions/AtomAction/AddAction.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/AtomAction/AddAction.cpp
rd74077 r952f38 12 12 #include "atom.hpp" 13 13 #include "element.hpp" 14 #include " log.hpp"14 #include "Helpers/Log.hpp" 15 15 #include "molecule.hpp" 16 #include " vector.hpp"17 #include " verbose.hpp"16 #include "LinearAlgebra/Vector.hpp" 17 #include "Helpers/Verbose.hpp" 18 18 #include "World.hpp" 19 19 … … 25 25 #include "UIElements/UIFactory.hpp" 26 26 #include "UIElements/Dialog.hpp" 27 #include " UIElements/ValueStorage.hpp"27 #include "Actions/ValueStorage.hpp" 28 28 29 29 const char AtomAddAction::NAME[] = "add-atom"; … … 42 42 }; 43 43 44 Dialog * AtomAddAction:: createDialog() {45 Dialog *dialog = UIFactory::getInstance().makeDialog();44 Dialog * AtomAddAction::fillDialog(Dialog *dialog) { 45 ASSERT(dialog,"No Dialog given when filling action dialog"); 46 46 47 47 dialog->queryElement(NAME, ValueStorage::getInstance().getDescription(NAME)); … … 61 61 // execute action 62 62 atom * first = World::getInstance().createAtom(); 63 first-> setType(elemental);64 first-> setPosition(position);65 DoLog(1) && (Log() << Verbose(1) << "Adding new atom with element " << first-> getType()->name << " at " << (first->getPosition()) << "." << endl);63 first->type = elemental; 64 first->x = position; 65 DoLog(1) && (Log() << Verbose(1) << "Adding new atom with element " << first->type->name << " at " << (first->x) << "." << endl); 66 66 // TODO: remove when all of World's atoms are stored. 67 67 std::vector<molecule *> molecules = World::getInstance().getAllMolecules();
Note:
See TracChangeset
for help on using the changeset viewer.
