Changes in src/Actions/Action.cpp [6d6b54:031f62]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/Action.cpp
r6d6b54 r031f62 13 13 #include "Actions/ActionRegistry.hpp" 14 14 #include "Actions/ActionHistory.hpp" 15 #include "Exceptions/MissingValueException.hpp" 16 #include "UIElements/Dialog.hpp" 15 17 #include "Helpers/MemDebug.hpp" 18 #include "UIElements/UIFactory.hpp" 19 20 #include "log.hpp" 21 #include "verbose.hpp" 16 22 17 23 using namespace std; … … 29 35 { 30 36 if(_doRegister){ 31 ActionRegistry::getInstance().register Action(this);37 ActionRegistry::getInstance().registerInstance(this); 32 38 } 33 39 } … … 40 46 } 41 47 42 void Action::call(){ 48 Dialog * Action::createDialog(){ 49 Dialog *dialog = UIFactory::getInstance().makeDialog(); 50 return fillDialog(dialog); 51 } 52 53 void Action::call(enum QueryOptions flag){ 43 54 if(!isActive()){ 44 55 return; 45 56 } 46 57 // forward to private virtual 47 state_ptr state = performCall(); 58 if (flag == Interactive) { 59 Dialog* dialog = createDialog(); 60 if (dialog->hasQueries()) { 61 dialog->display(); 62 } 63 delete(dialog); 64 } 65 state_ptr state = Action::failure; 66 // try { 67 state = performCall(); 68 // } catch(MissingValueException&) { 69 // DoeLog(0) && (eLog() << Verbose(0) << "There is a value missing for action " << getName() << endl); 70 // }; 71 48 72 if(shouldUndo() && state != failure){ 49 73 if(canUndo()){
Note:
See TracChangeset
for help on using the changeset viewer.