summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/komonthview.cpp2
-rw-r--r--microkde/KDGanttMinimizeSplitter.cpp21
-rw-r--r--microkde/KDGanttMinimizeSplitter.h5
3 files changed, 22 insertions, 6 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 7927307..8ee1363 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -771,5 +771,5 @@ int MonthViewCell::insertEvent(Event *event)
for ( i = mdayCount; i < count();++i ) {
QListBoxItem* it = this->item ( i );
- if ( text < it->text() ) {
+ if ( it && text < it->text() ) {
pos = i;
break;
diff --git a/microkde/KDGanttMinimizeSplitter.cpp b/microkde/KDGanttMinimizeSplitter.cpp
index fb5d4e3..72c4e60 100644
--- a/microkde/KDGanttMinimizeSplitter.cpp
+++ b/microkde/KDGanttMinimizeSplitter.cpp
@@ -53,4 +53,5 @@
#include <qvaluelist.h>
#include <qcursor.h>
+#include <qframe.h>
#ifndef KDGANTT_MASTER_CVS
//#include "KDGanttMinimizeSplitter.moc"
@@ -65,4 +66,16 @@ static int mouseOffset;
static int opaqueOldPos = -1; //### there's only one mouse, but this is a bit risky
+class KDRubberBand: public QFrame
+{
+public:
+ KDRubberBand( QWidget *parent, const char * name, WFlags f ) :QFrame ( parent, name, f ) {;}
+
+protected:
+ virtual void mousePressEvent ( QMouseEvent * )
+ {
+ close();
+ };
+
+};
KDGanttSplitterHandle::KDGanttSplitterHandle( Qt::Orientation o,
@@ -190,6 +203,8 @@ void KDGanttSplitterHandle::mouseReleaseEvent( QMouseEvent *e )
}
}
- if ( s->rubberBand() )
- s->rubberBand()->hide();
+ if ( s->rubberBand() ) {
+ //qDebug("hide rubberband ");
+ s->rubberBand()->close();
+ }
repaint();
}
@@ -682,5 +697,5 @@ void KDGanttMinimizeSplitter::setRubberband( int p )
#else
if ( !mRubberBand ) {
- mRubberBand = new QFrame( 0, "rubber", WStyle_NoBorder | WStyle_Customize | WStyle_StaysOnTop);
+ mRubberBand = new KDRubberBand( 0, "rubber", WStyle_NoBorder | WStyle_Customize | WStyle_StaysOnTop);
mRubberBand->setFrameStyle( Box | Raised );
//mRubberBand->setPalette( QPalette ( Qt::red.light(),Qt::red.dark() ) );
diff --git a/microkde/KDGanttMinimizeSplitter.h b/microkde/KDGanttMinimizeSplitter.h
index 585298d..3042e0a 100644
--- a/microkde/KDGanttMinimizeSplitter.h
+++ b/microkde/KDGanttMinimizeSplitter.h
@@ -44,4 +44,5 @@ class QSplitterData;
class QSplitterLayoutStruct;
class KDGanttSplitterHandle;
+class KDRubberBand;
class KDGanttMinimizeSplitter : public QFrame
{
@@ -81,5 +82,5 @@ public:
KDGanttSplitterHandle* firstHandle(){ return mFirstHandle;}
void expandPos( int id, int* min, int* max );
- QFrame* rubberBand() { return mRubberBand ;}
+ KDRubberBand* rubberBand() { return mRubberBand ;}
public slots:
void toggle();
@@ -101,5 +102,5 @@ protected:
private:
- QFrame* mRubberBand;
+ KDRubberBand* mRubberBand;
void init();
void recalc( bool update = FALSE );