Commit ae77b132 authored by Scott Petrovic's avatar Scott Petrovic

Group the create and close buttons together on the create new document window

parent ed9529ad
......@@ -147,9 +147,6 @@ KisOpenPane::KisOpenPane(QWidget *parent, const QStringList& mimeFilter, const Q
connect(d->m_sectionList, SIGNAL(itemActivated(QTreeWidgetItem*, int)),
this, SLOT(itemClicked(QTreeWidgetItem*)));
connect(d->cancelButton, SIGNAL(clicked()), this, SLOT(close()));
connect(d->cancelButton, SIGNAL(clicked()), this, SLOT(deleteLater()));
initTemplates(templatesResourcePath);
d->m_freeCustomWidgetIndex = 4;
......
......@@ -61,13 +61,6 @@
</column>
</widget>
</item>
<item>
<widget class="QPushButton" name="cancelButton">
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="1">
......
......@@ -620,6 +620,13 @@
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="cancelNewDocumentButton">
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="createButton">
<property name="text">
......
......@@ -108,6 +108,11 @@ KisCustomImageWidget::KisCustomImageWidget(QWidget* parent, qint32 defWidth, qin
connect(createButton, SIGNAL(clicked()), this, SLOT(createImage()));
createButton->setDefault(true);
// parent widget contains the window
connect(cancelNewDocumentButton, SIGNAL(clicked(bool)), this->parentWidget(), SLOT(close()));
connect(cancelNewDocumentButton, SIGNAL(clicked(bool)), this->parentWidget(), SLOT(deleteLater()));
bnPortrait->setIcon(KisIconUtils::loadIcon("portrait"));
connect(bnPortrait, SIGNAL(clicked()), SLOT(setPortrait()));
connect(bnLandscape, SIGNAL(clicked()), SLOT(setLandscape()));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment