Compare commits
4 Commits
b4d29f15da
...
3aebd3f2e9
Author | SHA1 | Date |
---|---|---|
ArgonarioD | 3aebd3f2e9 | |
karlis | 0543a02dfb | |
karlis | e6571faf8c | |
ArgonarioD | bf71d17b5d |
|
@ -6,6 +6,8 @@ LayerCreateWidget::LayerCreateWidget(ElementManager* elementManager, FolderLayer
|
||||||
{
|
{
|
||||||
this->elementManager = elementManager;
|
this->elementManager = elementManager;
|
||||||
ui.setupUi(this);
|
ui.setupUi(this);
|
||||||
|
ui.name->setPlaceholderText(QString::fromLocal8Bit(""));
|
||||||
|
ui.name->setText(QString::fromLocal8Bit("×Óͼ²ã-") + QString::number(folderLayer->children.size() + 1));
|
||||||
connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
|
connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
|
||||||
connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
|
connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
|
||||||
connect(ui.comboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(onCurrentIndexChanged(int)));
|
connect(ui.comboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(onCurrentIndexChanged(int)));
|
||||||
|
|
|
@ -93,13 +93,13 @@ void LayerTreeWidget::popMenu(const QPoint &pos)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (typeid(*layer) == typeid(FolderLayerWrapper) && ((FolderLayerWrapper*)layer)->getReferencedBy() == -1) {
|
if (typeid(*layer) == typeid(FolderLayerWrapper) && ((FolderLayerWrapper*)layer)->getReferencedBy() == -1) {
|
||||||
menu.addAction(QString::fromLocal8Bit("´´½¨×éºÏÔªËØ"), this, [this]() {
|
menu.addAction(QString::fromLocal8Bit("´´½¨×éºÏÔªËØ"), this, [this, layer]() {
|
||||||
auto layer = dynamic_cast<FolderLayerWrapper*>(this->selectedItem->data(0, Qt::UserRole).value<LayerWrapper*>());
|
auto layer = dynamic_cast<FolderLayerWrapper*>(this->selectedItem->data(0, Qt::UserRole).value<LayerWrapper*>());
|
||||||
if (layer != nullptr) {
|
if (layer != nullptr) {
|
||||||
bool ok;
|
bool ok;
|
||||||
QString name = QInputDialog::getText(this, QString::fromLocal8Bit("´´½¨×éºÏÔªËØ"),
|
QString name = QInputDialog::getText(this, QString::fromLocal8Bit("´´½¨×éºÏÔªËØ"),
|
||||||
QString::fromLocal8Bit("×éºÏÔªËØÃû³Æ:"), QLineEdit::Normal,
|
QString::fromLocal8Bit("×éºÏÔªËØÃû³Æ:"), QLineEdit::Normal,
|
||||||
"", &ok);
|
QString::fromLocal8Bit("ͼԴ") + layer->property.name, &ok);
|
||||||
if (ok && !name.isEmpty()) {
|
if (ok && !name.isEmpty()) {
|
||||||
elementManager->createGroupElement(name, layer);
|
elementManager->createGroupElement(name, layer);
|
||||||
emit triggerCentralRefresh();
|
emit triggerCentralRefresh();
|
||||||
|
|
Loading…
Reference in New Issue