Diffstat (limited to 'noncore/apps/confedit/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/confedit/mainwindow.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/noncore/apps/confedit/mainwindow.cpp b/noncore/apps/confedit/mainwindow.cpp index 17a5058..fc403d2 100644 --- a/noncore/apps/confedit/mainwindow.cpp +++ b/noncore/apps/confedit/mainwindow.cpp @@ -65,24 +65,25 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f ) : connect( editor->LineEditGroup, SIGNAL( textChanged(const QString&) ), SLOT( groupChanged(const QString&) ) ); connect( editor->LineEditKey, SIGNAL( textChanged(const QString&) ), SLOT( keyChanged(const QString&) ) ); connect( editor->LineEditValue, SIGNAL( textChanged(const QString&) ), SLOT( valueChanged(const QString&) ) ); // qDebug("editor->hide()"); // editor->hide(); qDebug("connect"); connect( settingList, SIGNAL( clicked( QListViewItem* ) ), this, SLOT( stopTimer( QListViewItem* ) ) ); + setCurrent(0); } void MainWindow::makeMenu() { qDebug("MainWindow::makeMenu()"); popupTimer = new QTimer(this); popupMenuFile = new QPopupMenu(this); popupMenuEntry = new QPopupMenu(this); qDebug("Save"); popupActionSave = new QAction( tr("Save"),QString::null, 0, this, 0 ); @@ -110,36 +111,37 @@ void MainWindow::makeMenu() this, SLOT(showPopup()) ); qDebug("connect"); } MainWindow::~MainWindow() { } void MainWindow::setCurrent(QListViewItem *item) { + editor->hide(); if (!item) return; _item = (ListViewItemConf*) item; if (!_item) return; popupTimer->start( 750, true ); if (_item->getType() == ListViewItemConf::File) { - editor->hide(); updateGeometry(); _currentItem=0; _fileItem = (ListViewItemConfFile*)item; return; - }else editor->show(); + } + editor->show(); _fileItem = 0; _currentItem = (ListViewItemConfigEntry*)item; if (!_currentItem) return; QString file = _currentItem->getFile(); QString group = _currentItem->getGroup(); QString key = _currentItem->getKey(); QString val = _currentItem->getValue(); editor->TextFileName->setText(file); editor->LineEditGroup->setText(group); if (!key.isEmpty()) { editor->isKey(true); |