[atlantik-cvs] CVS: kdegames/atlantik/libatlantikui trade_widget.cpp,1.34.4.4,1.34.4.5

[email protected]
Newsgroups gmane.comp.kde.devel.atlantik
Message-ID <[email protected]>
Update of /home/kde/kdegames/atlantik/libatlantikui
In directory office:/tmp/cvs-serv12153/libatlantikui

Modified Files:
      Tag: KDE_3_1_BRANCH
	trade_widget.cpp 
Log Message:
backport: anotha' trade patch

Index: trade_widget.cpp
===================================================================
RCS file: /home/kde/kdegames/atlantik/libatlantikui/trade_widget.cpp,v
retrieving revision 1.34.4.4
retrieving revision 1.34.4.5
diff -u -d -r1.34.4.4 -r1.34.4.5
--- trade_widget.cpp	13 Jan 2003 17:14:39 -0000	1.34.4.4
+++ trade_widget.cpp	23 Jun 2003 01:46:37 -0000	1.34.4.5
@@ -166,8 +166,10 @@
 
 void TradeDisplay::closeEvent(QCloseEvent *e)
 {
-	// Don't send network event when trade is already rejected (and thus 0)
-	if (m_trade)
+	// Don't send network event when trade is already rejected
+	if (m_trade->isRejected())
+		m_atlanticCore->removeTrade(m_trade);
+	else
 		emit reject(m_trade);
 
 	e->accept();
@@ -238,9 +240,6 @@
 	m_componentList->setEnabled(false);
 	m_rejectButton->setEnabled(false);
 	m_acceptButton->setEnabled(false);
-
-	// Empty trade pointer so closing window won't send network event
-	m_trade = 0;
 
 	// TODO: add/enable close button
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.