Skip to content

Commit

Permalink
Updated asset name tooltip for root/sub types.
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeIsTheKey committed Aug 17, 2024
1 parent 31ccf23 commit 095e2c6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/qt/createassetsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,9 @@ CreateAssetsDialog::CreateAssetsDialog(QWidget *parent) :

ui->RootAssetBox->setModel(proxy);
ui->RootAssetBox->setEditable(true);
ui->RootAssetBox->lineEdit()->setPlaceholderText("Select Root asset");
ui->assetnameText->setToolTip("a-z A-Z 0-9 and space");
ui->RootAssetBox->lineEdit()->setPlaceholderText(tr("Select Root asset"));
bool isRoot = ui->AssetTypeBox->currentText() == "Root";
ui->assetnameText->setToolTip(isRoot ? tr("A-Z 0-9, no spaces") : tr("a-z A-Z 0-9 and space"));
}

void CreateAssetsDialog::setClientModel(ClientModel *_clientModel) {
Expand Down Expand Up @@ -851,9 +852,11 @@ void CreateAssetsDialog::onAssetTypeSelected(QString name) {
if (name == "Root") {
ui->RootAssetLabel->setVisible(false);
ui->RootAssetBox->setVisible(false);
ui->assetnameText->setToolTip(tr("A-Z 0-9, no spaces"));
} else if (name == "Sub") {
ui->RootAssetLabel->setVisible(true);
ui->RootAssetBox->setVisible(true);
ui->assetnameText->setToolTip(tr("a-z A-Z 0-9 and space"));

// Get available assets list
std::map <uint256, std::pair<std::string, CKeyID>> assets = model->wallet().getMyAssets();
Expand Down

0 comments on commit 095e2c6

Please sign in to comment.