DrawTools, ui fix (line mode)

This commit is contained in:
2020-05-23 16:26:24 +03:00
parent da939e30c7
commit a627ea557e
4 changed files with 27 additions and 24 deletions

View File

@@ -509,7 +509,7 @@ void DrawTools::alignClicked() {
}
void DrawTools::setTollButtonsEnabled(bool pen, bool brush, bool wid_hei) {
void DrawTools::setToolButtonsEnabled(bool pen, bool brush, bool wid_hei) {
ui->labelPen->setEnabled(pen);
ui->colorButtonPen->setEnabled(pen);
ui->labelBrush->setEnabled(brush);
@@ -620,7 +620,7 @@ void DrawTools::selectionChanged() {
font_dlg.blockSignals(true);
font_dlg.setCurrentFont(itext->font());
font_dlg.blockSignals(false);
setTollButtonsEnabled(true, false, false);
setToolButtonsEnabled(true, false, false);
ui->widgetAlign2->setEnabled(false);
ui->widgetAlign9->setEnabled(false);
size_item.assignObject(itext);
@@ -631,7 +631,7 @@ void DrawTools::selectionChanged() {
font_dlg.blockSignals(true);
font_dlg.setCurrentFont(iatext->font());
font_dlg.blockSignals(false);
setTollButtonsEnabled(true, false, false);
setToolButtonsEnabled(true, false, false);
foreach (QAction * a, menu_hor.actions()) a->setChecked(false);
foreach (QAction * a, menu_ver.actions()) a->setChecked(false);
align = iatext->alignment();
@@ -655,7 +655,7 @@ void DrawTools::selectionChanged() {
} else if (ipixmap) {
ui->stackedProperties->setCurrentIndex(2);
ui->spinScale->setValue(sqrt(ipixmap->transform().determinant()));
setTollButtonsEnabled(false, false, false);
setToolButtonsEnabled(false, false, false);
size_item.assignObject(ipixmap);
} else if (irect || iell) {
ui->stackedProperties->setCurrentIndex(1);
@@ -675,7 +675,7 @@ void DrawTools::selectionChanged() {
ui->colorButtonBrush->setColor(ishape->brush().color());
ui->spinThick->setValue(ishape->pen().widthF());
ui->comboLineStyle->setCurrentIndex(qMin<int>((int)ishape->pen().style(), ui->comboLineStyle->count() - 1));
setTollButtonsEnabled(true, true, true);
setToolButtonsEnabled(true, true, true);
if (resize_enabled)
size_item.assignObject(ishape);
}
@@ -684,7 +684,7 @@ void DrawTools::selectionChanged() {
ui->colorButtonPen->setColor(iline->pen().color());
ui->spinThick->setValue(iline->pen().widthF());
ui->comboLineStyle->setCurrentIndex(qMin<int>((int)iline->pen().style(), ui->comboLineStyle->count() - 1));
setTollButtonsEnabled(true, false, false);
setToolButtonsEnabled(true, false, false);
if (resize_enabled)
size_item.assignObject(iline);
} else {