Skip to content

Commit

Permalink
Disable picking when closing panel
Browse files Browse the repository at this point in the history
  • Loading branch information
houmain committed Nov 12, 2021
1 parent e115496 commit a06235b
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions src/editors/EditorManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,17 @@ QWidget *EditorManager::createEditorPropertiesPanel(
layout->setAlignment(mFindReplaceBar, Qt::AlignTop);
layout->setAlignment(mTextureInfoBar, Qt::AlignTop);

connect(showAction, &QAction::triggered,
propertiesPanel, &QWidget::show);
connect(mFindReplaceBar, &FindReplaceBar::cancelled,
propertiesPanel, &QWidget::hide);
connect(mTextureInfoBar, &TextureInfoBar::cancelled,
propertiesPanel, &QWidget::hide);
connect(showAction, &QAction::triggered,
this, &EditorManager::updateEditorPropertiesVisibility);
const auto showPropertiesPanel = [this, propertiesPanel]() {
propertiesPanel->show();
updateEditorPropertiesVisibility();
};
const auto hidePropertiesPanel = [this, propertiesPanel]() {
propertiesPanel->hide();
updateEditorPropertiesVisibility();
};
connect(showAction, &QAction::triggered, showPropertiesPanel);
connect(mFindReplaceBar, &FindReplaceBar::cancelled, hidePropertiesPanel);
connect(mTextureInfoBar, &TextureInfoBar::cancelled, hidePropertiesPanel);

return propertiesPanel;
}
Expand Down

0 comments on commit a06235b

Please sign in to comment.