diff --git a/apps/opencs/model/settings/usersettings.cpp b/apps/opencs/model/settings/usersettings.cpp index 9e00b7d1a..41ce593b7 100644 --- a/apps/opencs/model/settings/usersettings.cpp +++ b/apps/opencs/model/settings/usersettings.cpp @@ -206,6 +206,14 @@ void CSMSettings::UserSettings::buildSettingModelDefaults() shiftCtrlDoubleClick->setDeclaredValues (values); shiftCtrlDoubleClick->setDefaultValue (editRecordAndClose); shiftCtrlDoubleClick->setToolTip ("Action on shift control double click in table:
" + toolTip);
+
+ QString defaultValue = "Jump and Select";
+ QStringList jumpValues = QStringList() << defaultValue << "Jump Only" << "No Jump";
+
+ Setting *jumpToAdded = createSetting (Type_RadioButton, "jump-to-added",
+ "Jump to the added or cloned record.");
+ jumpToAdded->setDefaultValue (defaultValue);
+ jumpToAdded->setDeclaredValues (jumpValues);
}
declareSection ("search", "Search & Replace");
diff --git a/apps/opencs/view/world/table.cpp b/apps/opencs/view/world/table.cpp
index 5a650f98a..44150bbc6 100644
--- a/apps/opencs/view/world/table.cpp
+++ b/apps/opencs/view/world/table.cpp
@@ -21,6 +21,7 @@
#include "../../model/world/tablemimedata.hpp"
#include "../../model/world/tablemimedata.hpp"
#include "../../model/world/commanddispatcher.hpp"
+#include "../../model/settings/usersettings.hpp"
#include "recordstatusdelegate.hpp"
#include "util.hpp"
@@ -255,6 +256,24 @@ CSVWorld::Table::Table (const CSMWorld::UniversalId& id,
: mCreateAction (0), mCloneAction(0), mRecordStatusDisplay (0),
DragRecordTable(document)
{
+ CSMSettings::UserSettings &settings = CSMSettings::UserSettings::instance();
+ QString jumpSetting = settings.settingValue ("table-input/jump-to-added");
+ if (jumpSetting.isEmpty() || jumpSetting == "Jump and Select") // default
+ {
+ mJumpToAddedRecord = true;
+ mUnselectAfterJump = false;
+ }
+ else if(jumpSetting == "Jump Only")
+ {
+ mJumpToAddedRecord = true;
+ mUnselectAfterJump = true;
+ }
+ else
+ {
+ mJumpToAddedRecord = false;
+ mUnselectAfterJump = false;
+ }
+
mModel = &dynamic_cast