Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified src/UIElements/TextUI/Query/MoleculeTextQuery.cpp

    rd754bb r8df74d  
    2424#include <Descriptors/MoleculeDescriptor.hpp>
    2525#include <Descriptors/MoleculeIdDescriptor.hpp>
    26 #include "TextUI/Query/TextQuery.hpp"
     26#include "TextUI/TextDialog.hpp"
    2727
    2828#include "Helpers/Log.hpp"
     
    4242  do{
    4343    badInput = false;
    44     std::cout << getDescription() << ": ";
    45     std::cin >> idxOfMol;
    46     if(std::cin.fail()){
     44    Log() << Verbose(0) << getTitle();
     45    cin >> idxOfMol;
     46    if(cin.fail()){
    4747      badInput = true;
    48       std::cin.clear();
    49       std::cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
    50       std::cout << "Input was not a number!" << std::endl;
     48      cin.clear();
     49      cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
     50      Log() << Verbose(0) << "Input was not a number!" << endl;
    5151      continue;
    5252    }
     
    5454    tmp = World::getInstance().getMolecule(MoleculeById(idxOfMol));
    5555    if(!tmp && idxOfMol!=-1){
    56       std::cout << "Invalid Molecule Index" << std::endl;
     56      Log() << Verbose(0) << "Invalid Molecule Index" << endl;
    5757      badInput = true;
    5858    }
    5959
    6060  } while(badInput);
    61   std::cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
     61  cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
    6262  return (idxOfMol!=-1);
    6363}
Note: See TracChangeset for help on using the changeset viewer.