Fix an annoying focus thing

This commit is contained in:
ArsenArsen 2017-05-11 14:49:00 +02:00
parent 4f5640763e
commit c2f35e9189
5 changed files with 9 additions and 0 deletions

View File

@ -75,6 +75,7 @@ QFont &CropScene::font() {
}
void CropScene::setDrawingSelection(QString name, std::function<DrawItem *()> drawAction) {
this->setFocus();
drawingSelectionMaker = drawAction;
drawingSelection = drawAction();
drawingName = name;

View File

@ -14,6 +14,7 @@ BlurDialog::BlurDialog(QGraphicsBlurEffect *e, QWidget *parent) : QDialog(parent
ui->quality->setChecked(effect->blurHints().testFlag(QGraphicsBlurEffect::QualityHint));
ui->radSlider->setValue(effect->blurRadius() * 100);
ui->radSpinner->setValue(effect->blurRadius());
this->setFocus();
connect(ui->buttonBox, &QDialogButtonBox::accepted, [&] {
QFlags<QGraphicsBlurEffect::BlurHint> hints;
hints.setFlag(QGraphicsBlurEffect::AnimationHint, ui->animated->isChecked());

View File

@ -10,6 +10,9 @@
<height>222</height>
</rect>
</property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="windowTitle">
<string>Blur Settings</string>
</property>

View File

@ -14,6 +14,7 @@ BrushPenSelection::BrushPenSelection(CropScene *scene) : QDialog(), ui(new Ui::B
ui->cosmetic->setChecked(scene->pen().isCosmetic());
ui->widthSlider->setValue(scene->pen().width());
ui->widthSpinner->setValue(scene->pen().widthF());
this->setFocus();
pen = scene->pen().color();
brush = scene->brush().color();
this->scene = scene;

View File

@ -10,6 +10,9 @@
<height>262</height>
</rect>
</property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>