git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: qgit shows wrong popup

From
MCMarco Costalba <mcostalba@yahoo.it>
Date
Jan 13, 2006, 17:41 UTC
Message-ID
<43C7E645.2050702@yahoo.it>
In-Reply-To
<e5bfff550601120455p1b1654cx43beb684a3fd5dc7@mail.gmail.com>
Show 8 quoted lines
>>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
Previous: Pavel RoskinNext: Pavel Roskin
Message 2 of 3 in “qgit shows wrong popup”
  1. Pavel RoskinJan 11, 2006
  2. Marco CostalbaJan 13, 2006
  3. Pavel RoskinJan 13, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.