Merged
--HG-- branch : feature
This commit is contained in:
commit
180e1ddc90
|
@ -143,7 +143,10 @@ MainWindow::MainWindow(QWidget *parent)
|
|||
connect(doc, &VPattern::CheckLayout, [this](){
|
||||
if (pattern->DataDetails()->count() == 0)
|
||||
{
|
||||
ActionDraw(true);
|
||||
if(not ui->actionDraw->isChecked())
|
||||
{
|
||||
ActionDraw(true);
|
||||
}
|
||||
}
|
||||
});
|
||||
connect(doc, &VPattern::SetCurrentPP, this, &MainWindow::GlobalChangePP);
|
||||
|
@ -688,6 +691,7 @@ void MainWindow::ClosedDialogWithApply(int result)
|
|||
vtool->FullUpdateFromGuiApply();
|
||||
}
|
||||
}
|
||||
SCASSERT(dialogTool != nullptr);
|
||||
QGraphicsItem *tool = dynamic_cast<QGraphicsItem *>(dialogTool->GetAssociatedTool());
|
||||
ui->view->itemClicked(tool);
|
||||
if (dialogTool->GetAssociatedTool() != nullptr)
|
||||
|
|
|
@ -85,7 +85,7 @@ DialogDetail::DialogDetail(const VContainer *data, const quint32 &toolId, QWidge
|
|||
connect(ui.checkBoxSeams, &QCheckBox::clicked, this, &DialogDetail::ClickedSeams);
|
||||
connect(ui.checkBoxClosed, &QCheckBox::clicked, this, &DialogDetail::ClickedClosed);
|
||||
connect(ui.checkBoxReverse, &QCheckBox::clicked, this, &DialogDetail::ClickedReverse);
|
||||
connect(ui.lineEditNameDetail, &QLineEdit::textChanged, this, &DialogDetail::NamePointChanged);
|
||||
connect(ui.lineEditNameDetail, &QLineEdit::textChanged, this, &DialogDetail::NameDetailChanged);
|
||||
|
||||
connect(ui.toolButtonDelete, &QToolButton::clicked, this, &DialogDetail::DeleteItem);
|
||||
connect(ui.toolButtonUp, &QToolButton::clicked, this, &DialogDetail::ScrollUp);
|
||||
|
@ -245,6 +245,27 @@ void DialogDetail::Remove()
|
|||
SetAddMode();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void DialogDetail::NameDetailChanged()
|
||||
{
|
||||
SCASSERT(labelEditNamePoint != nullptr);
|
||||
QLineEdit* edit = qobject_cast<QLineEdit*>(sender());
|
||||
if (edit)
|
||||
{
|
||||
if (edit->text().isEmpty())
|
||||
{
|
||||
flagName = false;
|
||||
ChangeColor(labelEditNamePoint, Qt::red);
|
||||
}
|
||||
else
|
||||
{
|
||||
flagName = true;
|
||||
ChangeColor(labelEditNamePoint, okColor);
|
||||
}
|
||||
}
|
||||
CheckState();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief NewItem add new object (point, arc, spline or spline path) to list
|
||||
|
|
|
@ -70,6 +70,8 @@ protected slots:
|
|||
void Cancel();
|
||||
void Remove();
|
||||
|
||||
private slots:
|
||||
void NameDetailChanged();
|
||||
private:
|
||||
|
||||
/** @brief ui keeps information about user interface */
|
||||
|
|
|
@ -928,8 +928,16 @@ void DialogTool::Build(const Tool &type)
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void DialogTool::SetAssociatedTool(VAbstractTool *tool)
|
||||
{
|
||||
this->associatedTool=tool;
|
||||
SetToolId(tool->getId());
|
||||
if (tool != nullptr)
|
||||
{
|
||||
associatedTool = tool;
|
||||
SetToolId(tool->getId());
|
||||
}
|
||||
else
|
||||
{
|
||||
associatedTool = nullptr;
|
||||
SetToolId(NULL_ID);
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue
Block a user