diff --git a/apps/opencs/view/world/infocreator.cpp b/apps/opencs/view/world/infocreator.cpp index 1db87fef8e..cdea2b27f9 100644 --- a/apps/opencs/view/world/infocreator.cpp +++ b/apps/opencs/view/world/infocreator.cpp @@ -144,6 +144,11 @@ void CSVWorld::InfoCreator::focus() mTopic->setFocus(); } +void CSVWorld::InfoCreator::callReturnPressed() +{ + emit inputReturnPressed(); +} + void CSVWorld::InfoCreator::topicChanged() { update(); diff --git a/apps/opencs/view/world/infocreator.hpp b/apps/opencs/view/world/infocreator.hpp index 2820d101b4..0c4a9fd4d3 100644 --- a/apps/opencs/view/world/infocreator.hpp +++ b/apps/opencs/view/world/infocreator.hpp @@ -56,6 +56,10 @@ namespace CSVWorld /// Focus main input widget void focus() override; + public slots: + + void callReturnPressed(); + private slots: void topicChanged(); diff --git a/apps/opencs/view/world/tablebottombox.cpp b/apps/opencs/view/world/tablebottombox.cpp index 47b63e5942..a7460bbcd1 100644 --- a/apps/opencs/view/world/tablebottombox.cpp +++ b/apps/opencs/view/world/tablebottombox.cpp @@ -264,13 +264,7 @@ void CSVWorld::TableBottomBox::createRecordsDirectlyRequest(const std::string& i { creator->reset(); creator->setText(id); - - /*Default system of createRequest - TODO: Modify so that user doesn't see the edit box*/ - mCreator->toggleWidgets(true); - mLayout->setCurrentWidget(mCreator); - setVisible(true); - mEditMode = EditMode_Creation; - mCreator->focus(); + creator->callReturnPressed(); } else {