mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-21 06:39:42 +00:00
Add option to open record editting subviews in new windows instead of exclusive docking.
This commit is contained in:
parent
f3f63a5f5b
commit
af5b1b3083
2 changed files with 21 additions and 1 deletions
|
@ -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);
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
@ -609,7 +611,7 @@ void CSVDoc::View::addSubView (const CSMWorld::UniversalId& id, const std::strin
|
|||
view = mSubViewFactory.makeSubView (id, *mDocument);
|
||||
}
|
||||
assert(view);
|
||||
view->setParent(this);
|
||||
view->setParent(this); // unfloats view
|
||||
view->setEditLock (mDocument->getState() & CSMDoc::State_Locked);
|
||||
mSubViews.append(view); // only after assert
|
||||
|
||||
|
@ -661,6 +663,21 @@ 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<CSVWorld::DialogueSubView*>(view);
|
||||
if (dialogueView)
|
||||
{
|
||||
dialogueView->setFloating(true);
|
||||
}
|
||||
|
||||
CSVWorld::ScriptSubView* scriptView = dynamic_cast<CSVWorld::ScriptSubView*>(view);
|
||||
if (scriptView)
|
||||
{
|
||||
scriptView->setFloating(true);
|
||||
}
|
||||
}
|
||||
|
||||
view->show();
|
||||
|
||||
if (!hint.empty())
|
||||
|
|
Loading…
Reference in a new issue