Procházet zdrojové kódy

UI: Fix transform dialog not being closable

If the user clicked away from the source, while the transform dialog is open,
the whole dialog would be disabled. The user then couldn't click close or
press escape to close the dialog. The only way for them to close it was to
click on another source to re-enable it.
cg2121 před 2 roky
rodič
revize
1b68944107
2 změnil soubory, kde provedl 671 přidání a 432 odebrání
  1. 668 431
      UI/forms/OBSBasicTransform.ui
  2. 3 1
      UI/window-basic-transform.cpp

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 668 - 431
UI/forms/OBSBasicTransform.ui


+ 3 - 1
UI/window-basic-transform.cpp

@@ -144,7 +144,9 @@ void OBSBasicTransform::SetItemQt(OBSSceneItem newItem)
 	if (item)
 		RefreshControls();
 
-	setEnabled(!!item);
+	bool enable = !!item;
+	ui->container->setEnabled(enable);
+	ui->buttonBox->button(QDialogButtonBox::Reset)->setEnabled(enable);
 }
 
 void OBSBasicTransform::OBSChannelChanged(void *param, calldata_t *data)

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů