diff --git a/CHANGELOG.md b/CHANGELOG.md index b388f0c18c..29a199808d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -156,6 +156,7 @@ Feature #6684: Support NiFltAnimationNode Feature #6699: Ignored flag Feature #6706: Save the size of the Options window + Feature #6721: [OpenMW-CS] Add option to open records in new window Task #6201: Remove the "Note: No relevant classes found. No output generated" warnings Task #6264: Remove the old classes in animation.cpp Task #6553: Simplify interpreter instruction registration diff --git a/apps/opencs/model/prefs/state.cpp b/apps/opencs/model/prefs/state.cpp index 97039df2eb..0acd8680c8 100644 --- a/apps/opencs/model/prefs/state.cpp +++ b/apps/opencs/model/prefs/state.cpp @@ -93,6 +93,9 @@ void CSMPrefs::State::declare() "If this option is enabled, types of affected records are selected " "manually before a command execution.\nOtherwise, all associated " "records are deleted/reverted immediately."); + declareBool ("subview-new-window", "Open Record in new window", false) + .setTooltip("When editing a record, open the view in a new window," + " rather than docked in the main view."); declareCategory ("ID Dialogues"); declareBool ("toolbar", "Show toolbar", true); diff --git a/apps/opencs/view/doc/view.cpp b/apps/opencs/view/doc/view.cpp index c89437d70d..1fea81ce97 100644 --- a/apps/opencs/view/doc/view.cpp +++ b/apps/opencs/view/doc/view.cpp @@ -25,6 +25,8 @@ #include "../world/subviews.hpp" #include "../world/scenesubview.hpp" #include "../world/tablesubview.hpp" +#include "../world/dialoguesubview.hpp" +#include "../world/scriptsubview.hpp" #include "../tools/subviews.hpp" @@ -661,6 +663,17 @@ void CSVDoc::View::addSubView (const CSMWorld::UniversalId& id, const std::strin this, SLOT(onRequestFocus(const std::string&))); } + if (CSMPrefs::State::get()["ID Tables"]["subview-new-window"].isTrue()) + { + CSVWorld::DialogueSubView* dialogueView = dynamic_cast(view); + if (dialogueView) + dialogueView->setFloating(true); + + CSVWorld::ScriptSubView* scriptView = dynamic_cast(view); + if (scriptView) + scriptView->setFloating(true); + } + view->show(); if (!hint.empty())