Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/Action.cpp

    r6d6b54 r031f62  
    1313#include "Actions/ActionRegistry.hpp"
    1414#include "Actions/ActionHistory.hpp"
     15#include "Exceptions/MissingValueException.hpp"
     16#include "UIElements/Dialog.hpp"
    1517#include "Helpers/MemDebug.hpp"
     18#include "UIElements/UIFactory.hpp"
     19
     20#include "log.hpp"
     21#include "verbose.hpp"
    1622
    1723using namespace std;
     
    2935{
    3036  if(_doRegister){
    31     ActionRegistry::getInstance().registerAction(this);
     37    ActionRegistry::getInstance().registerInstance(this);
    3238  }
    3339}
     
    4046}
    4147
    42 void Action::call(){
     48Dialog * Action::createDialog(){
     49  Dialog *dialog = UIFactory::getInstance().makeDialog();
     50  return fillDialog(dialog);
     51}
     52
     53void Action::call(enum QueryOptions flag){
    4354  if(!isActive()){
    4455    return;
    4556  }
    4657  // 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
    4872  if(shouldUndo() && state != failure){
    4973    if(canUndo()){
Note: See TracChangeset for help on using the changeset viewer.