Compare commits

..

No commits in common. "84bddf4447eeca22773b6c1769a613a12f974f1f" and "31f2c1be8f11e728050cef1b3fe7011787f48320" have entirely different histories.

2 changed files with 9 additions and 10 deletions

View File

@ -60,13 +60,13 @@ void InfoDisplayWidget::generateLayerForm()
emit requireRefreshElementWidget();
emit requireRefreshPreview();
});
scaleX->setValidator(new QDoubleValidator(-1000, 1000, 4, this));
scaleX->setValidator(new QDoubleValidator(0.001, 1000, 4, this));
connect(scaleX, &QLineEdit::textChanged, [=](QString content) {
this->displayLayer->property.scale = {content.toDouble(), this->displayLayer->property.scale.y()};
emit requireRefreshElementWidget();
emit requireRefreshPreview();
});
scaleY->setValidator(new QDoubleValidator(-1000, 1000, 4, this));
scaleY->setValidator(new QDoubleValidator(0.001, 1000, 4, this));
connect(scaleY, &QLineEdit::textChanged, [=](QString content) {
this->displayLayer->property.scale = {this->displayLayer->property.scale.x(), content.toDouble()};
emit requireRefreshElementWidget();

View File

@ -78,14 +78,13 @@ void LayerTreeWidget::popMenu(const QPoint &pos)
emit requireRefreshPreview();
});
menu.addAction(QString::fromLocal8Bit("ÖØÃüÃû"), this, &LayerTreeWidget::onRenameEvent);
if(typeid(*layer) == typeid(FolderLayerWrapper))
menu.addAction(QString::fromLocal8Bit("删除(保留子节点)"), this, [this]() {
auto layer = this->selectedItem->data(0, Qt::UserRole).value<LayerWrapper*>();
layer->delSelf();
layer->getParent()->removeChild(layer);
this->refresh();
emit requireRefreshPreview();
});
menu.addAction(QString::fromLocal8Bit("删除(保留子节点)"), this, [this]() {
auto layer = this->selectedItem->data(0, Qt::UserRole).value<LayerWrapper*>();
layer->delSelf();
layer->getParent()->removeChild(layer);
this->refresh();
emit requireRefreshPreview();
});
}
if (typeid(*layer) == typeid(FolderLayerWrapper) && ((FolderLayerWrapper*)layer)->getReferencedBy() == -1) {
menu.addAction(QString::fromLocal8Bit("´´½¨×éºÏÔªËØ"), this, [this]() {