mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-14 05:08:39 -05:00
Fix UI issues when opening ItemSettingsDialogs
Some widgets were displayed incorrectly if the parent of the dialog window is not the main settings window
This commit is contained in:
@@ -40,8 +40,8 @@ ActionQueueTable *ActionQueueTable::Create()
|
||||
void ActionQueueTable::Add()
|
||||
{
|
||||
auto newQueue = std::make_shared<ActionQueue>();
|
||||
auto accepted =
|
||||
ActionQueueSettingsDialog::AskForSettings(this, *newQueue);
|
||||
auto accepted = ActionQueueSettingsDialog::AskForSettings(
|
||||
GetSettingsWindow(), *newQueue);
|
||||
if (!accepted) {
|
||||
return;
|
||||
}
|
||||
@@ -124,7 +124,7 @@ static void openSettingsDialog()
|
||||
|
||||
auto oldName = queue->Name();
|
||||
bool accepted = ActionQueueSettingsDialog::AskForSettings(
|
||||
tabWidget->Table(), *queue.get());
|
||||
GetSettingsWindow(), *queue.get());
|
||||
if (accepted && oldName != queue->Name()) {
|
||||
ActionQueueSignalManager::Instance()->Rename(
|
||||
QString::fromStdString(oldName),
|
||||
|
||||
@@ -43,8 +43,8 @@ VariableTable *VariableTable::Create()
|
||||
void VariableTable::Add()
|
||||
{
|
||||
auto newVariable = std::make_shared<Variable>();
|
||||
auto accepted =
|
||||
VariableSettingsDialog::AskForSettings(this, *newVariable);
|
||||
auto accepted = VariableSettingsDialog::AskForSettings(
|
||||
GetSettingsWindow(), *newVariable);
|
||||
if (!accepted) {
|
||||
return;
|
||||
}
|
||||
@@ -184,7 +184,7 @@ static void openSettingsDialog()
|
||||
|
||||
auto oldName = variable->Name();
|
||||
bool accepted = VariableSettingsDialog::AskForSettings(
|
||||
tabWidget->Table(), *variable.get());
|
||||
GetSettingsWindow(), *variable.get());
|
||||
if (accepted && oldName != variable->Name()) {
|
||||
VariableSignalManager::Instance()->Rename(
|
||||
QString::fromStdString(oldName),
|
||||
|
||||
@@ -40,7 +40,7 @@ void WSConnectionsTable::Add()
|
||||
{
|
||||
auto newConnection = std::make_shared<WSConnection>();
|
||||
auto accepted = WSConnectionSettingsDialog::AskForSettings(
|
||||
this, *newConnection);
|
||||
GetSettingsWindow(), *newConnection);
|
||||
if (!accepted) {
|
||||
return;
|
||||
}
|
||||
@@ -143,7 +143,7 @@ static void openSettingsDialog()
|
||||
|
||||
auto oldName = connection->Name();
|
||||
bool accepted = WSConnectionSettingsDialog::AskForSettings(
|
||||
tabWidget->Table(), *connection.get());
|
||||
GetSettingsWindow(), *connection.get());
|
||||
if (accepted && oldName != connection->Name()) {
|
||||
ConnectionSelectionSignalManager::Instance()->Rename(
|
||||
QString::fromStdString(oldName),
|
||||
|
||||
@@ -44,8 +44,8 @@ TwitchConnectionsTable *TwitchConnectionsTable::Create()
|
||||
void TwitchConnectionsTable::Add()
|
||||
{
|
||||
auto newToken = std::make_shared<TwitchToken>();
|
||||
auto accepted =
|
||||
TwitchTokenSettingsDialog::AskForSettings(this, *newToken);
|
||||
auto accepted = TwitchTokenSettingsDialog::AskForSettings(
|
||||
GetSettingsWindow(), *newToken);
|
||||
if (!accepted) {
|
||||
return;
|
||||
}
|
||||
@@ -139,7 +139,7 @@ static void openSettingsDialog()
|
||||
return;
|
||||
}
|
||||
|
||||
TwitchTokenSettingsDialog::AskForSettings(tabWidget->Table(),
|
||||
TwitchTokenSettingsDialog::AskForSettings(GetSettingsWindow(),
|
||||
*token.get());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user