mirror of https://github.com/KLayout/klayout.git
Small bug fixes in the package manager
- Remove button wasn't enabled if multiple packages were selected - A potential crash on removing packages was fixed
This commit is contained in:
parent
aab425a58c
commit
475bf6eb83
|
|
@ -279,12 +279,13 @@ Salt::remove_grain (const SaltGrain &grain)
|
|||
{
|
||||
emit collections_about_to_change ();
|
||||
|
||||
tl::info << QObject::tr ("Removing package '%1' ..").arg (tl::to_qstring (grain.name ()));
|
||||
QString name = tl::to_qstring (grain.name ());
|
||||
tl::info << QObject::tr ("Removing package '%1' ..").arg (name);
|
||||
bool res = remove_from_collection (m_root, grain.name ());
|
||||
if (res) {
|
||||
tl::info << QObject::tr ("Package '%1' removed.").arg (tl::to_qstring (grain.name ()));
|
||||
tl::info << QObject::tr ("Package '%1' removed.").arg (name);
|
||||
} else {
|
||||
tl::warn << QObject::tr ("Failed to remove package '%1'.").arg (tl::to_qstring (grain.name ()));
|
||||
tl::warn << QObject::tr ("Failed to remove package '%1'.").arg (name);
|
||||
}
|
||||
|
||||
invalidate ();
|
||||
|
|
|
|||
|
|
@ -858,12 +858,12 @@ SaltManagerDialog::selected_changed ()
|
|||
details_text->set_grain (g);
|
||||
if (!g) {
|
||||
details_frame->setEnabled (false);
|
||||
delete_button->setEnabled (false);
|
||||
} else {
|
||||
details_frame->setEnabled (true);
|
||||
delete_button->setEnabled (true);
|
||||
edit_button->setEnabled (! g->is_readonly ());
|
||||
}
|
||||
|
||||
delete_button->setEnabled (! current_grains ().empty ());
|
||||
}
|
||||
|
||||
lay::SaltGrain *
|
||||
|
|
|
|||
Loading…
Reference in New Issue