Author: coolo
Date: Tue Apr 15 13:35:18 2008
New Revision: 46659
URL: http://svn.opensuse.org/viewcvs/yast?rev=46659&view=rev
Log:
fixing that wizard modules in the running system did
not appear 2 times out of 3
Modified:
trunk/qt/src/YQWizard.cc
trunk/qt/src/YQWizard.h
Modified: trunk/qt/src/YQWizard.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/YQWizard.cc?rev=46659&r1=46658&r2=46659&view=diff
==============================================================================
--- trunk/qt/src/YQWizard.cc (original)
+++ trunk/qt/src/YQWizard.cc Tue Apr 15 13:35:18 2008
@@ -75,6 +75,7 @@
#define USE_ICON_ON_HELP_BUTTON 0
+YQWizard *YQWizard::main_wizard = 0;
YQWizard::YQWizard( YWidget * parent,
const string & backButtonLabel,
@@ -90,7 +91,6 @@
, _backButtonLabel( backButtonLabel )
, _abortButtonLabel( abortButtonLabel )
, _nextButtonLabel( nextButtonLabel )
- , _secondary( false )
{
setObjectName( "wizard" );
@@ -138,9 +138,11 @@
if ( !_stepsEnabled )
QY2Styler::self()->registerWidget( this );
- if ( !_stepsEnabled && !_treeEnabled )
+ if ( !main_wizard && _stepsEnabled )
+ {
+ main_wizard = this;
+ } else if ( main_wizard )
{
- _secondary = true;
YQMainWinDock::mainWinDock()->resizeVisibleChild();
}
}
@@ -149,9 +151,14 @@
YQWizard::~YQWizard()
{
deleteSteps();
+ if ( this == main_wizard )
+ main_wizard = 0;
}
-
+bool YQWizard::isSecondary() const
+{
+ return this != main_wizard;
+}
void YQWizard::layoutTitleBar( QWidget * parent )
{
Modified: trunk/qt/src/YQWizard.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/YQWizard.h?rev=46659&r1=46658&r2=46659&view=diff
==============================================================================
--- trunk/qt/src/YQWizard.h (original)
+++ trunk/qt/src/YQWizard.h Tue Apr 15 13:35:18 2008
@@ -337,7 +337,7 @@
/**
* Returns true if the wizard should follow the first wizard with steps
**/
- bool isSecondary() const { return _secondary; }
+ bool isSecondary() const;
signals:
@@ -518,7 +518,6 @@
bool _protectNextButton;
bool _stepsDirty;
bool _sendButtonEvents;
- bool _secondary;
Direction _direction;
QString _currentStepID;
@@ -551,6 +550,8 @@
QHash