Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI: Fix remigrating scene collections from absolute to relative #11630

Open
wants to merge 1 commit into
base: release/31.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions UI/window-basic-main-scene-collections.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -636,8 +636,6 @@ void OBSBasic::on_actionRemigrateSceneCollection_triggered()
return;
}

OBSDataAutoRelease priv = obs_get_private_data();

if (!usingAbsoluteCoordinates && !migrationBaseResolution) {
OBSMessageBox::warning(
this, QTStr("Basic.Main.RemigrateSceneCollection.Title"),
Expand Down Expand Up @@ -691,12 +689,12 @@ void OBSBasic::on_actionRemigrateSceneCollection_triggered()
ResetVideo();
}

ActivateSceneCollection(currentCollection);
ActivateSceneCollection(currentCollection, !usingAbsoluteCoordinates);
}

// MARK: - Scene Collection Management Helper Functions

void OBSBasic::ActivateSceneCollection(const OBSSceneCollection &collection)
void OBSBasic::ActivateSceneCollection(const OBSSceneCollection &collection, bool remigrate)
{
const std::string currentCollectionName{config_get_string(App()->GetUserConfig(), "Basic", "SceneCollection")};

Expand All @@ -709,7 +707,7 @@ void OBSBasic::ActivateSceneCollection(const OBSSceneCollection &collection)
config_set_string(App()->GetUserConfig(), "Basic", "SceneCollection", collection.name.c_str());
config_set_string(App()->GetUserConfig(), "Basic", "SceneCollectionFile", collection.fileName.c_str());

Load(collection.collectionFile.u8string().c_str());
Load(collection.collectionFile.u8string().c_str(), remigrate);

RefreshSceneCollections();

Expand Down
2 changes: 1 addition & 1 deletion UI/window-basic-main.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1345,7 +1345,7 @@ public slots:
void RefreshSceneCollectionCache();

void RefreshSceneCollections(bool refreshCache = false);
void ActivateSceneCollection(const OBSSceneCollection &collection);
void ActivateSceneCollection(const OBSSceneCollection &collection, bool remigrate = false);

public:
inline const OBSSceneCollectionCache &GetSceneCollectionCache() const noexcept { return collections; };
Expand Down
Loading