mirror of
https://github.com/altlinux/admc.git
synced 2025-02-10 05:57:24 +03:00
fix incorrect isValid() calls
they were negated when they shouldn't be
This commit is contained in:
parent
e08f50d8ec
commit
e544b81ed2
@ -602,7 +602,7 @@ void console_object_properties(ConsoleWidget *console, ConsoleWidget *buddy_cons
|
||||
apply_changes_to_branch(find_root, ItemType_Object, ObjectRole_DN);
|
||||
|
||||
// Apply to policy branch
|
||||
if (!policy_root.isValid()) {
|
||||
if (policy_root.isValid()) {
|
||||
for (const AdObject &object : object_list) {
|
||||
const QString dn = object.get_dn();
|
||||
const QModelIndex object_index = target_console->search_item(policy_root, PolicyOURole_DN, dn, {ItemType_PolicyOU});
|
||||
|
@ -1131,8 +1131,8 @@ void ConsoleWidgetPrivate::on_navigate_up() {
|
||||
// NOTE: parent of target can be invalid, if current is
|
||||
// head item in which case we've reached top of tree and
|
||||
// can't go up higher
|
||||
const bool can_go_up = (!new_current.isValid());
|
||||
if (!can_go_up) {
|
||||
const bool can_go_up = (new_current.isValid());
|
||||
if (can_go_up) {
|
||||
q->set_current_scope(new_current);
|
||||
}
|
||||
}
|
||||
|
@ -269,7 +269,7 @@ void PolicyOUResultsWidget::remove_link() {
|
||||
for (const QString &gpo_dn : gpo_dn_list) {
|
||||
const QModelIndex gpo_index = console->search_item(ou_index, PolicyRole_DN, gpo_dn, {ItemType_Policy});
|
||||
|
||||
if (!gpo_index.isValid()) {
|
||||
if (gpo_index.isValid()) {
|
||||
console->delete_item(gpo_index);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user