Diffstat (limited to 'noncore/settings/networksettings2/editconnection.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/editconnection.cpp | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/noncore/settings/networksettings2/editconnection.cpp b/noncore/settings/networksettings2/editconnection.cpp index bda9d7e..a9bef65 100644 --- a/noncore/settings/networksettings2/editconnection.cpp +++ b/noncore/settings/networksettings2/editconnection.cpp @@ -440,35 +440,39 @@ void EditNetworkSetup::SLOT_SelectNode( QListViewItem * it ) { // store conversion from lvitem to node NN = (*Mapping)[ it ]; if( ! NN ) { - // intermediate node + // intermediate (controller) node NN = (*Mapping)[ it->parent() ]; if( NN ) { - // figure out type of this node -> produce mesage + // figure out type of this node -> produce message Description_LBL->setText( NSResources->netNode2Description( NN->needs()[0]) ); } else { Description_LBL->setText( "" ); } return; } + // clicked on regular node Description_LBL->setText( NN->nodeDescription() ); if( ! it->isSelectable() ) { return; } ANetNode::NetNodeList & NNL = NN->alternatives(); - if( NNL.size() != 1 ) { - if( NNL.size() == 0 || - ! ((MyQCheckListItem *)it)->isOn() - ) { - // not clicked on Check or Radio item + if( NNL.size() == 0 ) { + // this item has no alternatives -> end node + TmpIsValid = 0; + updateGUI( it, NN ); return; } + + if( ! ((MyQCheckListItem *)it)->isOn() ) { + // not clicked on Check or Radio item + return; } // item has really changed -> update TmpIsValid = 0; @@ -528,8 +532,9 @@ void EditNetworkSetup::SLOT_AlterTab( const QString & S ) { void EditNetworkSetup::updateGUI( QListViewItem * it, ANetNode * NN ) { bool HCC = haveCompleteConfig( it ); Tab_TB->setTabEnabled( Setup_FRM, HCC ); + Log(( "COMPLETE CONFIG %d\n", HCC )); Setup_FRM->setEnabled( HCC ); // disable children of all siblings at same level QListViewItem * Sbl = it->parent()->firstChild(); @@ -625,8 +630,9 @@ bool EditNetworkSetup::haveCompleteConfig( QListViewItem * it ) { it = it->nextSibling(); } if( ! Found ) { + Log(( "Setup not complete\n" )); return 0; // no not complete -> a radio should have been chkd } // it now contains selected radio |