Only enable Edit->Packet Comment... if we can save the file without
authorGuy Harris <guy@alum.mit.edu>
Tue, 2 Apr 2013 16:05:25 +0000 (16:05 -0000)
committerGuy Harris <guy@alum.mit.edu>
Tue, 2 Apr 2013 16:05:25 +0000 (16:05 -0000)
losing the packet comments, just as we now do in the GTK+ version.

svn path=/trunk/; revision=48699

ui/qt/main_window_slots.cpp

index 30f60b58a12fb32b0f945aad448f1f37de11983a..63e829ac4345741e83b175945ffefd84917cb093 100644 (file)
@@ -679,7 +679,7 @@ void MainWindow::setMenusForSelectedPacket()
 //    set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/EditMenu/EditPacket",
 //                         frame_selected);
 //#endif /* WANT_PACKET_EDITOR */
-    main_ui_->actionEditPacketComment->setEnabled(frame_selected);
+    main_ui_->actionEditPacketComment->setEnabled(frame_selected && wtap_dump_can_write(cap_file_->linktypes, WTAP_COMMENT_PER_PACKET));
 
     main_ui_->actionEditIgnorePacket->setEnabled(frame_selected);
     main_ui_->actionEditIgnoreAllDisplayed->setEnabled(have_filtered);