mirror of https://github.com/KLayout/klayout.git
Bugfix: package installation wasn't working from scratch
* Create the "salt" package directory as well - not just the package folder * Include the package folder in the error message * A better indication of what to do in the Apply button message
This commit is contained in:
parent
bd05fae9aa
commit
0accc84367
|
|
@ -366,7 +366,7 @@ public:
|
||||||
bool
|
bool
|
||||||
Salt::create_grain (const SaltGrain &templ, SaltGrain &target)
|
Salt::create_grain (const SaltGrain &templ, SaltGrain &target)
|
||||||
{
|
{
|
||||||
tl_assert (!m_root.is_empty ());
|
tl_assert (m_root.begin_collections () != m_root.end_collections ());
|
||||||
|
|
||||||
const SaltGrains *coll = m_root.begin_collections ().operator-> ();
|
const SaltGrains *coll = m_root.begin_collections ().operator-> ();
|
||||||
|
|
||||||
|
|
@ -407,8 +407,8 @@ Salt::create_grain (const SaltGrain &templ, SaltGrain &target)
|
||||||
if (subdir.exists () && ! subdir.isDir ()) {
|
if (subdir.exists () && ! subdir.isDir ()) {
|
||||||
throw tl::Exception (tl::to_string (tr ("Unable to create target directory '%1' for installing package - is already a file").arg (subdir.path ())));
|
throw tl::Exception (tl::to_string (tr ("Unable to create target directory '%1' for installing package - is already a file").arg (subdir.path ())));
|
||||||
} else if (! subdir.exists ()) {
|
} else if (! subdir.exists ()) {
|
||||||
if (! target_dir.mkdir (tl::to_qstring (*n))) {
|
if (! target_dir.mkpath (tl::to_qstring (*n))) {
|
||||||
throw tl::Exception (tl::to_string (tr ("Unable to create target directory '%1' for installing package").arg (subdir.path ())));
|
throw tl::Exception (tl::to_string (tr ("Unable to create target directory '%1' for installing package").arg (subdir.filePath ())));
|
||||||
}
|
}
|
||||||
if (! target_dir.cd (tl::to_qstring (*n))) {
|
if (! target_dir.cd (tl::to_qstring (*n))) {
|
||||||
throw tl::Exception (tl::to_string (tr ("Unable to change to target directory '%1' for installing package").arg (subdir.path ())));
|
throw tl::Exception (tl::to_string (tr ("Unable to change to target directory '%1' for installing package").arg (subdir.path ())));
|
||||||
|
|
|
||||||
|
|
@ -454,7 +454,7 @@ SaltManagerDialog::update_apply_state ()
|
||||||
|
|
||||||
apply_new_button->setEnabled (marked > 0);
|
apply_new_button->setEnabled (marked > 0);
|
||||||
if (marked == 0) {
|
if (marked == 0) {
|
||||||
apply_label_new->setText (QString ());
|
apply_label_new->setText (tr ("Select at least one package for installation (check button)"));
|
||||||
} else if (marked == 1) {
|
} else if (marked == 1) {
|
||||||
apply_label_new->setText (tr ("One package selected"));
|
apply_label_new->setText (tr ("One package selected"));
|
||||||
} else if (marked > 1) {
|
} else if (marked > 1) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue