manage display event corectly
This commit is contained in:
1 parent
92c520dc08
commit
6491f723ff
8 files changed
+22
-38
No files matched your search
@@ -73,6 +73,13 @@ RatesDlg::RatesDlg(QWidget *parent) : BufferedDrawDlg(parent), ui(new Ui::RatesD
|
||||
ui->taxDownBtn->onClick = [this] { taxLuxBtnClick(1); };
|
||||
ui->scienceBtn->onClick = [this] { taxLuxBtnClick(2); };
|
||||
ui->luxBtn->onClick = [this] { taxLuxBtnClick(3); };
|
||||
onShow = [this] {
|
||||
setWindowTitle(phrase(QStringLiteral("TITLE_RATES")));
|
||||
const bool hasLiberty = ClientTools::myRO->Wonder[woLiberty].EffectiveOwner == ClientTools::me;
|
||||
ui->scienceBtn->setVisible(!hasLiberty);
|
||||
ui->luxBtn->setVisible(!hasLiberty);
|
||||
offscreenPaint();
|
||||
};
|
||||
}
|
||||
|
||||
RatesDlg::~RatesDlg()
|
||||
@@ -164,16 +171,6 @@ void RatesDlg::resizeEvent(QResizeEvent *event)
|
||||
ui->closeBtn->move(width() - 38, ui->closeBtn->y());
|
||||
}
|
||||
|
||||
void RatesDlg::showEvent(QShowEvent *event)
|
||||
{
|
||||
BufferedDrawDlg::showEvent(event);
|
||||
setWindowTitle(phrase(QStringLiteral("TITLE_RATES")));
|
||||
const bool hasLiberty = ClientTools::myRO->Wonder[woLiberty].EffectiveOwner == ClientTools::me;
|
||||
ui->scienceBtn->setVisible(!hasLiberty);
|
||||
ui->luxBtn->setVisible(!hasLiberty);
|
||||
offscreenPaint();
|
||||
}
|
||||
|
||||
void RatesDlg::taxLuxBtnClick(int which)
|
||||
{
|
||||
int newTax = ClientTools::myRO->TaxRate / 10;
|
||||
|
||||
Reference in new issue
Block a user