WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 7ed1e23

Browse files
committed
added functionality to the cancel buttons of the ButtonBox
both cancel button of add entity and add property has been updated
1 parent 230ecb0 commit 7ed1e23

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/tiled/mainwindow.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2290,6 +2290,10 @@ void MainWindow::onCreateEntity()
22902290
CreateObjectLayout->addWidget(CreateObjectName);
22912291
CreateObjectLayout->addWidget(CreateObjectConfirm);
22922292

2293+
connect(CreateObjectConfirm, &QDialogButtonBox::rejected, this, [=]{
2294+
CreateObject->reject();
2295+
});
2296+
22932297
if(CurrentLayer && CurrentLayer->layerType() == Layer::ObjectGroupType){
22942298
ObjectGroup *objectGroup = dynamic_cast<ObjectGroup*>(CurrentLayer);
22952299
connect(CreateObjectConfirm, &QDialogButtonBox::accepted, this, [=]{

src/tiled/propertieswidget.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3149,6 +3149,9 @@ void PropertiesWidget::showAddValueProperty()
31493149
TextureFilePath->setText(AC_TextureFilePath);
31503150
}
31513151
});
3152+
connect(ButtonBox,&QDialogButtonBox::rejected, this, [=]{
3153+
PropertyWindow->reject();
3154+
});
31523155

31533156
connect(ButtonBox, &QDialogButtonBox::accepted, this, [=]{
31543157
switch(ComponentLayout->currentIndex()){

0 commit comments

Comments
 (0)