From 36bd4b5255937dc40078553c7841a0a086fe92bd Mon Sep 17 00:00:00 2001 From: Date: Sun, 15 Jun 2008 23:15:34 +0000 Subject: [PATCH] bugfix 2576,2571,2641 --- src/gui/FWWindowPrint.cpp | 3 ++- src/gui/ObjectListView.cpp | 7 ++++++- src/gui/ObjectListView.h | 3 ++- src/gui/RuleSetView.cpp | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/gui/FWWindowPrint.cpp b/src/gui/FWWindowPrint.cpp index ef1019831..0ac07b880 100644 --- a/src/gui/FWWindowPrint.cpp +++ b/src/gui/FWWindowPrint.cpp @@ -274,7 +274,8 @@ void printFirewall(FWObject *fw, bool newPageForSection, ProjectPanel *project) { - + if (Firewall::cast(fw)==NULL) + return ; list listPT; QString txt; diff --git a/src/gui/ObjectListView.cpp b/src/gui/ObjectListView.cpp index a1beb89ea..d59192dbe 100644 --- a/src/gui/ObjectListView.cpp +++ b/src/gui/ObjectListView.cpp @@ -67,6 +67,8 @@ ObjectListView::ObjectListView(QWidget* parent, const char*, setItemMargin( 2 );*/ setFocusPolicy( Qt::StrongFocus ); setFocus(); + header()->setClickable(true); + connect (header (),SIGNAL(sectionClicked (int)),this,SLOT(sectionClicked (int))); } bool ObjectListView::event ( QEvent * event ) @@ -191,4 +193,7 @@ void ObjectListView::mouseMoveEvent ( QMouseEvent * event ) QTreeWidget::mouseMoveEvent(event); } - +void ObjectListView::sectionClicked ( int logicalIndex ) +{ + sortByColumn ( logicalIndex, Qt::AscendingOrder ); +} diff --git a/src/gui/ObjectListView.h b/src/gui/ObjectListView.h index 51ade9079..e711e0cd2 100644 --- a/src/gui/ObjectListView.h +++ b/src/gui/ObjectListView.h @@ -54,7 +54,8 @@ class ObjectListView : public QTreeWidget { public: ObjectListView(QWidget* parent = 0, const char * name = 0, Qt::WindowFlags f = 0); - + public slots: + void sectionClicked ( int logicalIndex ) ; signals: void delObject_sign(); diff --git a/src/gui/RuleSetView.cpp b/src/gui/RuleSetView.cpp index 2b9873407..a49cd2ae9 100644 --- a/src/gui/RuleSetView.cpp +++ b/src/gui/RuleSetView.cpp @@ -1646,7 +1646,7 @@ void RuleSetView::paintCell(QPainter *pntr, p.setPen( cg.highlightedText().color() ); } else { - p.fillRect(rect, cg.brush( QPalette::Base )); // crole + p.fillRect(rect, cg.brush( QPalette::Mid )); // crole p.setPen( cg.text().color() ); } } else