Skip to content

Commit

Permalink
Merge pull request #3911 from Autodesk/bailp/EMSUSD-1510/save-layer-b…
Browse files Browse the repository at this point in the history
…utton-name

EMSUSD-1510 save-layer button's name
  • Loading branch information
seando-adsk authored Sep 18, 2024
2 parents 2da2a95 + 90690d4 commit 5d5c425
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions lib/usd/ui/layerEditor/layerEditorWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,20 +108,23 @@ QLayout* LayerEditorWidget::setupLayout_toolbar()
auto buttonAlignment = Qt::AlignLeft | Qt::AlignRight;

auto addHIGButton
= [buttonSize, toolbar, buttonAlignment](const QString& iconName, const QString& tooltip) {
= [buttonSize, toolbar, buttonAlignment](
const QString& iconName, const QString& tooltip, const QString& uiName) {
auto higButtonYOffset = DPIScale(4);
auto higBtn = new QPushButton();
higBtn->move(0, higButtonYOffset);
QtUtils::setupButtonWithHIGBitmaps(higBtn, iconName);
higBtn->setFixedSize(buttonSize, buttonSize);
higBtn->setToolTip(tooltip);
higBtn->setObjectName(uiName);
toolbar->addWidget(higBtn, 0, buttonAlignment);
return higBtn;
};

_buttons._newLayer = addHIGButton(
":/UsdLayerEditor/LE_add_layer",
StringResources::getAsQString(StringResources::kAddNewLayer));
StringResources::getAsQString(StringResources::kAddNewLayer),
"LayerEditorAddLayerButton");
// clicked callback
connect(
_buttons._newLayer,
Expand Down Expand Up @@ -149,7 +152,8 @@ QLayout* LayerEditorWidget::setupLayout_toolbar()

_buttons._loadLayer = addHIGButton(
":/UsdLayerEditor/LE_import_layer",
StringResources::getAsQString(StringResources::kLoadExistingLayer));
StringResources::getAsQString(StringResources::kLoadExistingLayer),
"LayerEditorImportLayerButton");
// clicked callback
connect(
_buttons._loadLayer,
Expand Down Expand Up @@ -182,6 +186,7 @@ QLayout* LayerEditorWidget::setupLayout_toolbar()
saveStageBtn->setFixedSize(saveButtonSize);
QtUtils::setupButtonWithHIGBitmaps(saveStageBtn, ":/UsdLayerEditor/LE_save_all");
saveStageBtn->setFixedSize(buttonSize, buttonSize);
saveStageBtn->setObjectName("LayerEditorSaveAllButton");

saveStageBtn->setToolTip(
StringResources::getAsQString(StringResources::kSaveAllEditsInLayerStack));
Expand Down

0 comments on commit 5d5c425

Please sign in to comment.