Browse Source

Fix an annoying focus thing

tags/v5.0.0
ArsenArsen 5 years ago
parent
commit
c2f35e9189
  1. 1
      cropeditor/cropscene.cpp
  2. 1
      cropeditor/settings/blurdialog.cpp
  3. 3
      cropeditor/settings/blurdialog.ui
  4. 1
      cropeditor/settings/brushpenselection.cpp
  5. 3
      cropeditor/settings/brushpenselection.ui

1
cropeditor/cropscene.cpp

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

1
cropeditor/settings/blurdialog.cpp

@ -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());

3
cropeditor/settings/blurdialog.ui

@ -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>

1
cropeditor/settings/brushpenselection.cpp

@ -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;

3
cropeditor/settings/brushpenselection.ui

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

Loading…
Cancel
Save