Compare commits

...

2 Commits

Author SHA1 Message Date
karlis 84bddf4447 Merge branch 'main' of http://101.34.228.45:3000/BigC/ArchitectureColoredPainting 2023-03-18 16:26:51 +08:00
karlis 24f8daf1fd 菜单优化 2023-03-17 17:14:09 +08:00
2 changed files with 10 additions and 9 deletions

View File

@ -60,13 +60,13 @@ void InfoDisplayWidget::generateLayerForm()
emit requireRefreshElementWidget();
emit requireRefreshPreview();
});
scaleX->setValidator(new QDoubleValidator(0.001, 1000, 4, this));
scaleX->setValidator(new QDoubleValidator(-1000, 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(0.001, 1000, 4, this));
scaleY->setValidator(new QDoubleValidator(-1000, 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,6 +78,7 @@ 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();