[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdelibs/kdeui
From: Dominik Haumann <dhdev () gmx ! de>
Date: 2005-03-04 22:40:23
Message-ID: 20050304224023.6A3B7157B9 () office ! kde ! org
[Download RAW message or body]
CVS commit by dhaumann:
Fix missing statement (which fixes yet another bug(s) :)
The real patch is only:
+ if (fixedWidth0!=-1 || fixedHeight0!=-1) restoreFromForcedFixedSize((KDockWidget*)child0);
+ if (fixedWidth1!=-1 || fixedHeight1!=-1) restoreFromForcedFixedSize((KDockWidget*)child1);
- if (fixedWidth0!=-1) restoreFromForcedFixedSize((KDockWidget*)child0);
- if (fixedWidth1!=-1) restoreFromForcedFixedSize((KDockWidget*)child1);
Code cleanups bloat up the code, so don't be confused.
Backport follows.
M +22 -52 kdockwidget_private.cpp 1.55
--- kdelibs/kdeui/kdockwidget_private.cpp #1.54:1.55
@@ -73,60 +72,31 @@ void KDockSplitter::activate(QWidget *c0
updateName();
divider->show();
+
+ // without this resize event, things will not work. why exactly? :(
resizeEvent(0);
- // dominik: the following is still something I don't understand 100%
- // I even think that this includes some bugs!
- if (fixedWidth0!=-1) restoreFromForcedFixedSize((KDockWidget*)child0);
- if (fixedWidth1!=-1) restoreFromForcedFixedSize((KDockWidget*)child1);
- if (((KDockWidget*)child0)->forcedFixedWidth()!=-1)
- {
- setForcedFixedWidth(((KDockWidget*)child0),((KDockWidget*)child0)->forcedFixedWidth());
- //QTimer::singleShot(100,this,SLOT(delayedResize()));
- }
- else
- if (((KDockWidget*)child1)->forcedFixedWidth()!=-1)
- {
- setForcedFixedWidth(((KDockWidget*)child1),((KDockWidget*)child1)->forcedFixedWidth());
- //QTimer::singleShot(100,this,SLOT(delayedResize()));
- }
- if (((KDockWidget*)child0)->forcedFixedHeight()!=-1)
- {
- setForcedFixedHeight(((KDockWidget*)child0),((KDockWidget*)child0)->forcedFixedHeight());
- //QTimer::singleShot(100,this,SLOT(delayedResize()));
- }
- else
- if (((KDockWidget*)child1)->forcedFixedHeight()!=-1)
- {
- setForcedFixedHeight(((KDockWidget*)child1),((KDockWidget*)child1)->forcedFixedHeight());
- //QTimer::singleShot(100,this,SLOT(delayedResize()));
- }
- /*
- if (m_orientation == Horizontal) {
- if (fixedHeight0!=-1) restoreFromForcedFixedSize((KDockWidget*)child0);
- if (fixedHeight1!=-1) restoreFromForcedFixedSize((KDockWidget*)child1);
+ KDockWidget* dw0 = (KDockWidget*) child0;
+ KDockWidget* dw1 = (KDockWidget*) child1;
- } else {
- if (fixedWidth0!=-1) restoreFromForcedFixedSize((KDockWidget*)child0);
- if (fixedWidth1!=-1) restoreFromForcedFixedSize((KDockWidget*)child1);
- }
+ // if fixed size is set, restore first, to restore xpos correctly
+ if( fixedWidth0 != -1 || fixedHeight0 != -1 ) restoreFromForcedFixedSize( dw0 );
+ if( fixedWidth1 != -1 || fixedHeight1 != -1 ) restoreFromForcedFixedSize( dw1 );
-// if (m_orientation == Vertical) {
- if (((KDockWidget*)child0)->forcedFixedWidth()!=-1) {
- setForcedFixedWidth(((KDockWidget*)child0),((KDockWidget*)child0)->forcedFixedWidth());
+ // now force fixed sizes, if they are set.
+ if( dw0->forcedFixedWidth() != -1 ) {
+ setForcedFixedWidth( dw0, dw0->forcedFixedWidth() );
}
- else if (((KDockWidget*)child1)->forcedFixedWidth()!=-1) {
- setForcedFixedWidth(((KDockWidget*)child1),((KDockWidget*)child1)->forcedFixedWidth());
+ else if( dw1->forcedFixedWidth() != -1 ) {
+ setForcedFixedWidth( dw1, dw1->forcedFixedWidth() );
}
-// } else {
- if (((KDockWidget*)child0)->forcedFixedHeight()!=-1) {
- setForcedFixedHeight(((KDockWidget*)child0),((KDockWidget*)child0)->forcedFixedHeight());
+
+ if( dw0->forcedFixedHeight() != -1 ) {
+ setForcedFixedHeight (dw0, dw0->forcedFixedHeight() );
}
- else if (((KDockWidget*)child1)->forcedFixedHeight()!=-1) {
- setForcedFixedHeight(((KDockWidget*)child1),((KDockWidget*)child1)->forcedFixedHeight());
+ else if( dw1->forcedFixedHeight() != -1 ) {
+ setForcedFixedHeight( dw1, dw1->forcedFixedHeight() );
}
-// }
- */
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic