Fix an annoying focus thing
This commit is contained in:
parent
4f5640763e
commit
c2f35e9189
@ -75,6 +75,7 @@ QFont &CropScene::font() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CropScene::setDrawingSelection(QString name, std::function<DrawItem *()> drawAction) {
|
void CropScene::setDrawingSelection(QString name, std::function<DrawItem *()> drawAction) {
|
||||||
|
this->setFocus();
|
||||||
drawingSelectionMaker = drawAction;
|
drawingSelectionMaker = drawAction;
|
||||||
drawingSelection = drawAction();
|
drawingSelection = drawAction();
|
||||||
drawingName = name;
|
drawingName = name;
|
||||||
|
@ -14,6 +14,7 @@ BlurDialog::BlurDialog(QGraphicsBlurEffect *e, QWidget *parent) : QDialog(parent
|
|||||||
ui->quality->setChecked(effect->blurHints().testFlag(QGraphicsBlurEffect::QualityHint));
|
ui->quality->setChecked(effect->blurHints().testFlag(QGraphicsBlurEffect::QualityHint));
|
||||||
ui->radSlider->setValue(effect->blurRadius() * 100);
|
ui->radSlider->setValue(effect->blurRadius() * 100);
|
||||||
ui->radSpinner->setValue(effect->blurRadius());
|
ui->radSpinner->setValue(effect->blurRadius());
|
||||||
|
this->setFocus();
|
||||||
connect(ui->buttonBox, &QDialogButtonBox::accepted, [&] {
|
connect(ui->buttonBox, &QDialogButtonBox::accepted, [&] {
|
||||||
QFlags<QGraphicsBlurEffect::BlurHint> hints;
|
QFlags<QGraphicsBlurEffect::BlurHint> hints;
|
||||||
hints.setFlag(QGraphicsBlurEffect::AnimationHint, ui->animated->isChecked());
|
hints.setFlag(QGraphicsBlurEffect::AnimationHint, ui->animated->isChecked());
|
||||||
|
@ -10,6 +10,9 @@
|
|||||||
<height>222</height>
|
<height>222</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="focusPolicy">
|
||||||
|
<enum>Qt::StrongFocus</enum>
|
||||||
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Blur Settings</string>
|
<string>Blur Settings</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -14,6 +14,7 @@ BrushPenSelection::BrushPenSelection(CropScene *scene) : QDialog(), ui(new Ui::B
|
|||||||
ui->cosmetic->setChecked(scene->pen().isCosmetic());
|
ui->cosmetic->setChecked(scene->pen().isCosmetic());
|
||||||
ui->widthSlider->setValue(scene->pen().width());
|
ui->widthSlider->setValue(scene->pen().width());
|
||||||
ui->widthSpinner->setValue(scene->pen().widthF());
|
ui->widthSpinner->setValue(scene->pen().widthF());
|
||||||
|
this->setFocus();
|
||||||
pen = scene->pen().color();
|
pen = scene->pen().color();
|
||||||
brush = scene->brush().color();
|
brush = scene->brush().color();
|
||||||
this->scene = scene;
|
this->scene = scene;
|
||||||
|
@ -10,6 +10,9 @@
|
|||||||
<height>262</height>
|
<height>262</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="focusPolicy">
|
||||||
|
<enum>Qt::StrongFocus</enum>
|
||||||
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Dialog</string>
|
<string>Dialog</string>
|
||||||
</property>
|
</property>
|
||||||
|
Loading…
Reference in New Issue
Block a user