-
Notifications
You must be signed in to change notification settings - Fork 222
Fix various EF dialog issues. #4688
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
0ff4fdd
EMSUSD-3936 Fix issue on Mac OSX where the EF window would go behind …
deboisj 010b788
Preserve Edit Forwarding window position and size
deboisj 9be8e90
remove needlessly verbose comment
deboisj 48429eb
Fix EF menu and title strings
deboisj dfdfb48
Fix EF button tooltips
deboisj cdb67b6
Update comments on window flags for Maya dialogs
deboisj ad9e98f
clang
deboisj File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -178,8 +178,7 @@ QLayout* LayerEditorWidget::setupLayout_toolbar() | |
| _buttons._toggleEFButton = new QPushButton(); | ||
| _buttons._toggleEFButton->setFlat(true); | ||
| _buttons._toggleEFButton->setFixedSize(buttonSize, buttonSize); | ||
| _buttons._toggleEFButton->setToolTip( | ||
| StringResources::getAsQString(StringResources::kToggleEditForwarding)); | ||
| // Tooltip reflects the current edit forwarding state; set by updateButtons(). | ||
| _buttons._toggleEFButton->setObjectName("LayerEditorToggleEFButton"); | ||
| toolbar->addWidget(_buttons._toggleEFButton, 0, buttonAlignment); | ||
| connect( | ||
|
|
@@ -524,9 +523,13 @@ void LayerEditorWidget::updateButtons() | |
| _updateButtonsOnIdle = false; | ||
|
|
||
| #ifdef WANT_ADSK_USD_EDIT_FORWARD_BUILD | ||
| // Update the EF toolbar button icon to reflect the current edit forwarding active state. | ||
| // Update the EF toolbar button icon and tooltip to reflect the current edit forwarding | ||
| // active state. | ||
| if (_buttons._toggleEFButton) { | ||
| const bool efActive = _sessionState.isEditForwardMode(); | ||
| _buttons._toggleEFButton->setToolTip(StringResources::getAsQString( | ||
| efActive ? StringResources::kEditForwardingTooltipEnabled | ||
| : StringResources::kEditForwardingTooltipDisabled)); | ||
| const auto baseName = efActive ? ":/UsdLayerEditor/ef_on" : ":/UsdLayerEditor/ef_default"; | ||
| _buttons._toggleEFButton->setStyleSheet( | ||
| QString("QPushButton { padding: %1px; background-image: url(%2); " | ||
|
|
@@ -733,22 +736,32 @@ void LayerEditorWidget::onSplitterMoved(int pos, int index) | |
| void LayerEditorWidget::openEditForwardDialog() | ||
| { | ||
| auto* ss = &_sessionState; | ||
| if (_editForwardDialog) { | ||
| if (!_editForwardDialog) { | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changes here are also bascially the same as what was done in AR 3aa943c |
||
| _editForwardDialog = new UsdEditForwardConfig::EditForwardDialog( | ||
| StringResources::getAsQString(StringResources::kConfigureEditForwardingTitle), | ||
| MQtUtil::mainWindow()); | ||
| // While the layer editor is open, follow its current stage. | ||
| QObject::connect(ss, &SessionState::currentStageChangedSignal, this, [this, ss]() { | ||
| if (_editForwardDialog) { | ||
| _editForwardDialog->setActiveStage(ss->stage()); | ||
| } | ||
| }); | ||
| } | ||
|
|
||
| // If the dialog was previously minimized, restore it before showing. | ||
| if (_editForwardDialog->isMinimized()) { | ||
| _editForwardDialog->setWindowState( | ||
| (_editForwardDialog->windowState() & ~Qt::WindowMinimized) | Qt::WindowActive); | ||
| } | ||
|
|
||
| // Only show() a dialog that is actually hidden. Showing a saveWindowPref | ||
| // window re-applies its stored position, which would move an already-open | ||
| // dialog away from where the user last dragged it. | ||
| if (!_editForwardDialog->isVisible()) { | ||
| _editForwardDialog->show(); | ||
| _editForwardDialog->raise(); | ||
| _editForwardDialog->activateWindow(); | ||
| return; | ||
| } | ||
| _editForwardDialog = new UsdEditForwardConfig::EditForwardDialog( | ||
| StringResources::getAsQString(StringResources::kConfigureEditForwardingTitle), | ||
| MQtUtil::mainWindow()); | ||
| // While the layer editor is open, follow its current stage. | ||
| QObject::connect(ss, &SessionState::currentStageChangedSignal, this, [this, ss]() { | ||
| if (_editForwardDialog) { | ||
| _editForwardDialog->setActiveStage(ss->stage()); | ||
| } | ||
| }); | ||
| _editForwardDialog->show(); | ||
| _editForwardDialog->raise(); | ||
| _editForwardDialog->activateWindow(); | ||
| } | ||
|
|
||
| #endif // WANT_ADSK_USD_EDIT_FORWARD_BUILD | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stop forcing the size everytime. Via size hint and with the other changes below, keeps the user size