2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-30 22:25:12 +00:00

inline bots panel crash fixed, field placeholder fixed, controls active in mediaview when context menu is shown

This commit is contained in:
John Preston
2016-01-02 08:33:26 +08:00
parent e43ea5101e
commit 4426e2dd78
4 changed files with 34 additions and 21 deletions

View File

@@ -490,7 +490,7 @@ void MediaView::close() {
}
void MediaView::activateControls() {
_controlsHideTimer.start(int(st::mvWaitHide));
if (!_menu) _controlsHideTimer.start(int(st::mvWaitHide));
if (_controlsState == ControlsHiding || _controlsState == ControlsHidden) {
_controlsState = ControlsShowing;
_controlsAnimStarted = getms();
@@ -500,7 +500,7 @@ void MediaView::activateControls() {
}
void MediaView::onHideControls(bool force) {
if (!force && !_dropdown.isHidden()) return;
if (!force && (!_dropdown.isHidden() || _menu)) return;
if (_controlsState == ControlsHiding || _controlsState == ControlsHidden) return;
_controlsState = ControlsHiding;
_controlsAnimStarted = getms();
@@ -1871,6 +1871,7 @@ void MediaView::contextMenuEvent(QContextMenuEvent *e) {
connect(_menu, SIGNAL(destroyed(QObject*)), this, SLOT(onMenuDestroy(QObject*)));
_menu->popup(e->globalPos());
e->accept();
activateControls();
}
}
@@ -1968,6 +1969,7 @@ void MediaView::hide() {
void MediaView::onMenuDestroy(QObject *obj) {
if (_menu == obj) {
_menu = 0;
activateControls();
}
_receiveMouse = false;
QTimer::singleShot(0, this, SLOT(receiveMouse()));