fixed comment voting

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8224 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
electron128 2015-05-09 09:28:38 +00:00
parent 71ca750fc8
commit 21d62edca2
4 changed files with 12 additions and 3 deletions

View File

@ -47,9 +47,7 @@ GxsCommentDialog::GxsCommentDialog(QWidget *parent, RsTokenService *token_servic
connect(ui->refreshButton, SIGNAL(clicked()), this, SLOT(refresh()));
connect(ui->idChooser, SIGNAL(currentIndexChanged( int )), this, SLOT(voterSelectionChanged( int )));
/* force voterId through - first time */
voterSelectionChanged( 0 );
connect(ui->idChooser, SIGNAL(idsLoaded()), this, SLOT(idChooserReady()));
}
GxsCommentDialog::~GxsCommentDialog()
@ -81,6 +79,11 @@ void GxsCommentDialog::refresh()
commentLoad(mGrpId, mMsgId);
}
void GxsCommentDialog::idChooserReady()
{
voterSelectionChanged(0);
}
void GxsCommentDialog::voterSelectionChanged( int index )
{
std::cerr << "GxsCommentDialog::voterSelectionChanged(" << index << ")";

View File

@ -46,6 +46,7 @@ public:
private slots:
void refresh();
void idChooserReady();
void voterSelectionChanged( int index );
private:

View File

@ -219,6 +219,7 @@ void GxsIdChooser::loadPrivateIds()
setItemData(count() - 1, TYPE_CREATE_ID, ROLE_TYPE);
}
setDefaultItem();
emit idsLoaded();
}
mFirstLoad = false;

View File

@ -56,6 +56,10 @@ public:
bool setChosenId(const RsGxsId &gxsId);
ChosenId_Ret getChosenId(RsGxsId &gxsId);
signals:
// emitted after first load of own ids
void idsLoaded();
protected:
virtual void showEvent(QShowEvent *event);
void updateDisplay(bool reset);