All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marco Costalba <mcostalba@yahoo.it>
To: Pavel Roskin <proski@gnu.org>
Cc: git <git@vger.kernel.org>
Subject: Re: qgit shows wrong popup
Date: Fri, 13 Jan 2006 18:41:25 +0100	[thread overview]
Message-ID: <43C7E645.2050702@yahoo.it> (raw)
In-Reply-To: <e5bfff550601120455p1b1654cx43beb684a3fd5dc7@mail.gmail.com>


>>I found this comment in mainimpl.cpp:
>>  // call an async context popup, DO NOT filter out event
>>  // we append the event to main event loop queue so Qt can send
>>  // currentChanged() signal to listViewLog before our popup is
>>populated
>>
>>I guess the code doesn't work the way the comment says.
>>
Hi Pavel,

please test the following an let me know if it is ok for you.

@@ -1378,9 +1378,21 @@ void MainImpl::customEvent(QCustomEvent*
  	if (e->type() == STATS_EV) // archive loading complete
  		loadComplete(((ThreadStatsEvent*)e)->data());

-	if (e->type() == POPUP_EV) // deferred popup
-		doContexPopup(listViewLog->currentItem());
-
+	if (e->type() == POPUP_EV) { // deferred popup
+		QListViewItem* item = listViewLog->currentItem();
+		if (item) {
+			// if mainview is already updated pop-up
+			// context menu, otherwise it means dispatch()
+			// has not been called til now, so resend the event,
+			// it will be queued up after dispatch.
+			if (item->text(COMMIT_COL) == mainViewSha)
+				doContexPopup(listViewLog->currentItem());
+			else {
+				DeferredPopupEvent* e = new DeferredPopupEvent();
+				QApplication::postEvent(this, e);
+			}
+		}
+	}
  	if (e->type() == POPUP_TREE_EV) // deferred tree popup
  		doTreeContexPopup(treeView->currentItem());



	

	
		
___________________________________ 
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB 
http://mail.yahoo.it

  parent reply	other threads:[~2006-01-13 17:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-11 23:21 qgit shows wrong popup Pavel Roskin
     [not found] ` <e5bfff550601120455p1b1654cx43beb684a3fd5dc7@mail.gmail.com>
2006-01-13 17:41   ` Marco Costalba [this message]
2006-01-13 21:06     ` Pavel Roskin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43C7E645.2050702@yahoo.it \
    --to=mcostalba@yahoo.it \
    --cc=git@vger.kernel.org \
    --cc=proski@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.