QMessageBox::StandardButton aRes = QMessageBox::warning(
theParent, tr("Delete features"),
QString(tr("Selected features are used in the following features: %1.\
-These features will be deleted.\n%2Would you like to continue?")).arg(aDirectNames)
+ These features will be deleted.\n%2Would you like to continue?")).arg(aDirectNames)
.arg(aIndirectNames.isEmpty() ? QString() : QString("Also these features will be deleted: %1.\n").arg(aIndirectNames)),
QMessageBox::No | QMessageBox::Yes, QMessageBox::No);
if (aRes != QMessageBox::Yes)
:Activate module_LightApp_ModuleDlg {type='LightApp_ModuleDlg' unnamed='1' visible='1' windowTitle='Activate module'}
:Close active study.Close w/o saving_QPushButton {text='Close w/o saving' type='QPushButton' unnamed='1' visible='1' window=':Close active study_SUIT_MessageBox'}
:Close active study_SUIT_MessageBox {type='SUIT_MessageBox' unnamed='1' visible='1' windowTitle='Close active study'}
+:Delete features.No_QPushButton {text='No' type='QPushButton' unnamed='1' visible='1' window=':Delete features_QMessageBox'}
+:Delete features._QLabel {name='qt_msgbox_label' type='QLabel' visible='1' window=':Delete features_QMessageBox'}
+:Delete features_QMessageBox {type='QMessageBox' unnamed='1' visible='1' windowTitle='Delete features'}
:Exit.Ok_QPushButton {text='Ok' type='QPushButton' unnamed='1' visible='1' window=':Exit_SalomeApp_ExitDlg'}
:Exit.Shutdown servers_QCheckBox {text='Shutdown servers' type='QCheckBox' unnamed='1' visible='1' window=':Exit_SalomeApp_ExitDlg'}
:Exit_SalomeApp_ExitDlg {type='SalomeApp_ExitDlg' unnamed='1' visible='1' windowTitle='Exit'}
:Point_QFrame {container=':SALOME*.Point_XGUI_PropertyPanel' type='QFrame' unnamed='1' visible='1'}
:SALOME*.ConstructionPoint_QToolButton {container=':SALOME*.Construction_QtxToolBar' text='Point' type='QToolButton' unnamed='1' visible='1' window=':SALOME*_STD_TabDesktop'}
:SALOME*.Construction_QtxToolBar {name='Construction' type='QtxToolBar' visible='1' window=':SALOME*_STD_TabDesktop' windowTitle='Construction'}
+:SALOME*.New part_QToolButton {text='New part' type='QToolButton' unnamed='1' visible='1' window=':SALOME*_STD_TabDesktop'}
:SALOME*.NewGeom_QToolButton {text='NewGeom' type='QToolButton' unnamed='1' visible='1' window=':SALOME*_STD_TabDesktop'}
:SALOME*.Object browser_QDockWidget {type='QDockWidget' unnamed='1' visible='1' window=':SALOME*_STD_TabDesktop' windowTitle='Object browser'}
:SALOME*.Parameter_QToolButton {text='Parameter' type='QToolButton' unnamed='1' visible='1' window=':SALOME*_STD_TabDesktop'}
--- /dev/null
+def main():
+ source(findFile("scripts", "common.py"))
+
+ startApplication("salome_run.sh")
+
+ create_new_document()
+
+ clickButton(waitForObject(":SALOME*.Parameter_QToolButton"))
+ type(waitForObject(":Parameter_QLineEdit"), "aa")
+ type(waitForObject(":Parameter_ExpressionEditor"), "4")
+ clickButton(waitForObject(":Parameter.property_panel_ok_QToolButton"))
+
+ clickButton(waitForObject(":SALOME*.New part_QToolButton"))
+
+ clickButton(waitForObject(":SALOME*.Parameter_QToolButton"))
+ type(waitForObject(":Parameter_QLineEdit"), "bb")
+ type(waitForObject(":Parameter_ExpressionEditor"), "aa+1")
+ clickButton(waitForObject(":Parameter.property_panel_ok_QToolButton"))
+
+ openItemContextMenu(waitForObject(":Object browser_XGUI_DataTree"), "Parameters (1).aa = 4", 10, 10, 0)
+ activateItem(waitForObjectItem(":_QMenu", "Delete"))
+ waitFor("object.exists(':Delete features._QLabel')", 20000)
+ test.compare(str(findObject(":Delete features._QLabel").text), "Selected features are used in the following features: bb.These features will be deleted.\nWould you like to continue?")
+ clickButton(waitForObject(":Delete features.No_QPushButton"))
+
+ close_application()