# HG changeset patch # User lbajardsilogic # Date 1195816719 0 # Node ID 2e81141893dbd9d3b0aa20cea951755da37b9c4b # Parent 7386cd014f5275a7c13bf93a9686efc987caeb45 resolve problem with hide and show action of the PropertyBox diff -r 7386cd014f52 -r 2e81141893db widgets/ItemAudioFilterList.cpp --- a/widgets/ItemAudioFilterList.cpp Thu Nov 22 15:54:30 2007 +0000 +++ b/widgets/ItemAudioFilterList.cpp Fri Nov 23 11:18:39 2007 +0000 @@ -97,10 +97,7 @@ void ItemAudioFilterList::configAction(){ if(m_propertyBox!=0){ - //m_propertyBox->close(); - m_propertyBox->setWindowFlags(m_propertyBox->windowFlags() | Qt::WindowStaysOnTopHint); - m_propertyBox->show(); - m_propertyBox->activateWindow(); + m_propertyBox->showNormal(); } } diff -r 7386cd014f52 -r 2e81141893db widgets/ItemLayerList.cpp --- a/widgets/ItemLayerList.cpp Thu Nov 22 15:54:30 2007 +0000 +++ b/widgets/ItemLayerList.cpp Fri Nov 23 11:18:39 2007 +0000 @@ -120,10 +120,7 @@ void ItemLayerList::configAction(){ if(m_propertyBox!=0){ - //m_propertyBox->close(); - m_propertyBox->setWindowFlags(m_propertyBox->windowFlags() | Qt::WindowStaysOnTopHint); - m_propertyBox->show(); - m_propertyBox->activateWindow(); + m_propertyBox->showNormal(); } } diff -r 7386cd014f52 -r 2e81141893db widgets/PropertyBox.cpp --- a/widgets/PropertyBox.cpp Thu Nov 22 15:54:30 2007 +0000 +++ b/widgets/PropertyBox.cpp Fri Nov 23 11:18:39 2007 +0000 @@ -95,8 +95,7 @@ connect(UnitDatabase::getInstance(), SIGNAL(unitDatabaseChanged()), this, SLOT(unitDatabaseChanged())); - move(MainWindow::instance()->pos().x() + 3*MainWindow::instance()->width()/4, - MainWindow::instance()->pos().y() + 3*MainWindow::instance()->height()/5); + setWindowFlags(windowFlags() | Qt::WindowStaysOnTopHint); #ifdef DEBUG_PROPERTY_BOX std::cerr << "PropertyBox[" << this << "]::PropertyBox returning" << std::endl; @@ -768,6 +767,16 @@ } } +void PropertyBox::showNormal() +{ + if (!isVisible()) + { + move(MainWindow::instance()->pos().x() + 3*MainWindow::instance()->width()/4, + MainWindow::instance()->pos().y() + 3*MainWindow::instance()->height()/5); + } + QWidget::showNormal(); + activateWindow(); +} LEDButton* PropertyBox::showButton(){ return m_showButton; @@ -779,3 +788,4 @@ PropertyContainer* PropertyBox::container(){ return m_container; } + diff -r 7386cd014f52 -r 2e81141893db widgets/PropertyBox.h --- a/widgets/PropertyBox.h Thu Nov 22 15:54:30 2007 +0000 +++ b/widgets/PropertyBox.h Fri Nov 23 11:18:39 2007 +0000 @@ -38,6 +38,8 @@ PropertyContainer *getContainer() { return m_container; } + void showNormal(); + signals: void changePlayGain(float); void changePlayGainDial(int);