diff --git a/apps/opencs/view/world/pathgridcreator.cpp b/apps/opencs/view/world/pathgridcreator.cpp index 166acafd2..ae9ce7242 100644 --- a/apps/opencs/view/world/pathgridcreator.cpp +++ b/apps/opencs/view/world/pathgridcreator.cpp @@ -48,6 +48,8 @@ CSVWorld::PathgridCreator::PathgridCreator( mCell->model()->sort(0); mCell->setCurrentIndex(0); + + connect(mCell, SIGNAL (currentIndexChanged(const QString&)), this, SLOT (cellChanged())); } std::string CSVWorld::PathgridCreator::getErrors() const @@ -73,3 +75,19 @@ std::string CSVWorld::PathgridCreator::getErrors() const return errors; } + +void CSVWorld::PathgridCreator::focus() +{ + mCell->setFocus(); +} + +void CSVWorld::PathgridCreator::reset() +{ + CSVWorld::GenericCreator::reset(); + mCell->setCurrentIndex(0); +} + +void CSVWorld::PathgridCreator::cellChanged() +{ + update(); +} diff --git a/apps/opencs/view/world/pathgridcreator.hpp b/apps/opencs/view/world/pathgridcreator.hpp index 5508fadd7..6ed8004e2 100644 --- a/apps/opencs/view/world/pathgridcreator.hpp +++ b/apps/opencs/view/world/pathgridcreator.hpp @@ -29,6 +29,17 @@ namespace CSVWorld /// \return Error description for current user input. virtual std::string getErrors() const; + + /// \brief Set focus to cell ID input widget. + virtual void focus(); + + /// \brief Reset selected cell ID. + virtual void reset(); + + private slots: + + /// \brief Check user input for errors. + void cellChanged(); }; }