mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-03-06 05:36:10 -05:00
another try to fix that damn bug
This commit is contained in:
parent
74663509dc
commit
e34ed72ff7
@ -123,22 +123,40 @@ CreateCircleDialog::CreateCircleDialog()
|
||||
CreateCircleDialog::~CreateCircleDialog()
|
||||
{
|
||||
}
|
||||
void CreateCircleDialog::closeEvent(QCloseEvent *e)
|
||||
|
||||
bool CreateCircleDialog::tryClose()
|
||||
{
|
||||
if(mIdentitiesLoading || mCircleLoading)
|
||||
{
|
||||
std::cerr << "Close() called. Identities or circle currently loading => not actually closing." << std::endl;
|
||||
mCloseRequested = true;
|
||||
e->ignore();
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cerr << "Close() called. Identities not currently loading => closing." << std::endl;
|
||||
QDialog::closeEvent(e);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
void CreateCircleDialog::accept()
|
||||
{
|
||||
if(tryClose())
|
||||
QDialog::accept();
|
||||
}
|
||||
void CreateCircleDialog::reject()
|
||||
{
|
||||
if(tryClose())
|
||||
QDialog::reject();
|
||||
}
|
||||
|
||||
void CreateCircleDialog::keyPressEvent(QKeyEvent *e)
|
||||
{
|
||||
if(e->key() != Qt::Key_Escape)
|
||||
QDialog::keyPressEvent(e);
|
||||
}
|
||||
|
||||
|
||||
void CreateCircleDialog::editExistingId(const RsGxsGroupId &circleId, const bool &clearList /*= true*/,bool readonly)
|
||||
{
|
||||
/* load this circle */
|
||||
|
@ -62,8 +62,11 @@ private slots:
|
||||
void MembershipListCustomPopupMenu( QPoint point);
|
||||
|
||||
protected:
|
||||
virtual void closeEvent(QCloseEvent *) override;
|
||||
virtual void keyPressEvent(QKeyEvent *e) override;
|
||||
virtual void accept() override;
|
||||
virtual void reject() override;
|
||||
|
||||
bool tryClose();
|
||||
private:
|
||||
|
||||
void updateCircleGUI();
|
||||
|
Loading…
x
Reference in New Issue
Block a user