Fixed #209: bug where message window reply button did not reply to the correct callsign
This commit is contained in:
		
							parent
							
								
									74ab440249
								
							
						
					
					
						commit
						2d88671034
					
				| @ -157,6 +157,8 @@ QString MessageWindow::prepareReplyMessage(QString path, QString text){ | |||||||
| 
 | 
 | ||||||
| void MessageWindow::on_messageTableWidget_selectionChanged(const QItemSelection &/*selected*/, const QItemSelection &/*deselected*/){ | void MessageWindow::on_messageTableWidget_selectionChanged(const QItemSelection &/*selected*/, const QItemSelection &/*deselected*/){ | ||||||
|     auto row = ui->messageTableWidget->currentRow(); |     auto row = ui->messageTableWidget->currentRow(); | ||||||
|  | 
 | ||||||
|  |     // message column
 | ||||||
|     auto item = ui->messageTableWidget->item(row, ui->messageTableWidget->columnCount()-1); |     auto item = ui->messageTableWidget->item(row, ui->messageTableWidget->columnCount()-1); | ||||||
|     if(!item){ |     if(!item){ | ||||||
|         return; |         return; | ||||||
| @ -168,13 +170,15 @@ void MessageWindow::on_messageTableWidget_selectionChanged(const QItemSelection | |||||||
| 
 | 
 | ||||||
| void MessageWindow::on_replyPushButton_clicked(){ | void MessageWindow::on_replyPushButton_clicked(){ | ||||||
|     auto row = ui->messageTableWidget->currentRow(); |     auto row = ui->messageTableWidget->currentRow(); | ||||||
|     auto item = ui->messageTableWidget->item(row, ui->messageTableWidget->columnCount()-2); | 
 | ||||||
|  |     // from column
 | ||||||
|  |     auto item = ui->messageTableWidget->item(row, ui->messageTableWidget->columnCount()-3); | ||||||
|     if(!item){ |     if(!item){ | ||||||
|         return; |         return; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     auto path = item->data(Qt::UserRole).toString(); |     auto path = item->data(Qt::UserRole).toString(); | ||||||
|     auto text = "[MESSAGE]"; // ui->replytextEdit->toPlainText();
 |     auto text = "[MESSAGE]"; | ||||||
|     auto message = prepareReplyMessage(path, text); |     auto message = prepareReplyMessage(path, text); | ||||||
| 
 | 
 | ||||||
|     emit replyMessage(message); |     emit replyMessage(message); | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Jordan Sherer
						Jordan Sherer