Sketcher: Grid settings - disable spacing when auto mode selected and vice versa
This commit is contained in:
committed by
abdullahtahiriyo
parent
42a08a5cf5
commit
127bc9f57b
@@ -112,8 +112,7 @@ SketcherSettingsGrid::SketcherSettingsGrid(QWidget* parent)
|
||||
styles << qMakePair(Qt::SolidLine, 0xffff)
|
||||
<< qMakePair(Qt::DashLine, 0x0f0f)
|
||||
<< qMakePair(Qt::DotLine, 0xaaaa);
|
||||
// << qMakePair(Qt::DashDotLine, 0x????)
|
||||
// << qMakePair(Qt::DashDotDotLine, 0x????);
|
||||
|
||||
ui->gridLinePattern->setIconSize(QSize(80, 12));
|
||||
ui->gridDivLinePattern->setIconSize(QSize(80, 12));
|
||||
for (QList < QPair<Qt::PenStyle, int> >::iterator it = styles.begin(); it != styles.end(); ++it) {
|
||||
@@ -133,6 +132,12 @@ SketcherSettingsGrid::SketcherSettingsGrid(QWidget* parent)
|
||||
ui->gridLinePattern->addItem(QIcon(px), QString(), QVariant(it->second));
|
||||
ui->gridDivLinePattern->addItem(QIcon(px), QString(), QVariant(it->second));
|
||||
}
|
||||
|
||||
ui->gridSize->setEnabled(!ui->checkBoxGridAuto->isChecked());
|
||||
|
||||
QObject::connect(ui->checkBoxGridAuto,&Gui::PrefCheckBox::stateChanged, [this](int state) {
|
||||
ui->gridSize->setEnabled(state != Qt::Checked);
|
||||
});
|
||||
}
|
||||
|
||||
SketcherSettingsGrid::~SketcherSettingsGrid()
|
||||
|
||||
@@ -90,7 +90,7 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_gridSize">
|
||||
<property name="text">
|
||||
<string>Grid spacing (if auto disabled)</string>
|
||||
<string>Grid spacing</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>gridSize</cstring>
|
||||
|
||||
Reference in New Issue
Block a user