disable tooltip when displayed value changes/is edited

This commit is contained in:
thrust26 2020-11-18 23:54:43 +01:00
parent 6185d9ef06
commit 9ab2a5c417
4 changed files with 14 additions and 3 deletions

View File

@ -17,6 +17,7 @@
#include "Widget.hxx"
#include "Dialog.hxx"
#include "ToolTip.hxx"
#include "Font.hxx"
#include "OSystem.hxx"
#include "Debugger.hxx"
@ -294,6 +295,7 @@ void DataGridWidget::handleMouseWheel(int x, int y, int direction)
else if(direction < 0)
incrementCell();
}
dialog().tooltip().hide();
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -491,6 +493,7 @@ bool DataGridWidget::handleKeyDown(StellaKey key, StellaMod mod)
sendCommand(DataGridWidget::kSelectionChangedCmd, _selectedItem, _id);
setDirty();
dialog().tooltip().hide();
}
_currentKeyDown = key;
@ -582,7 +585,8 @@ int DataGridWidget::getToolTipIndex(const Common::Point& pos) const
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
string DataGridWidget::getToolTip(const Common::Point& pos) const
{
const Int32 val = _valueList[getToolTipIndex(pos)];
const int idx = getToolTipIndex(pos);
const Int32 val = _valueList[idx];
ostringstream buf;
buf << _toolTipText

View File

@ -20,6 +20,8 @@
#include "Debugger.hxx"
#include "DiStella.hxx"
#include "Widget.hxx"
#include "Dialog.hxx"
#include "ToolTip.hxx"
#include "StellaKeys.hxx"
#include "FBSurface.hxx"
#include "Font.hxx"
@ -646,6 +648,7 @@ void RomListWidget::startEditMode()
return;
_editMode = true;
dialog().tooltip().hide();
switch(myDisasm->list[_selectedItem].type)
{
case Device::GFX:

View File

@ -19,6 +19,8 @@
#include "Base.hxx"
#include "StellaKeys.hxx"
#include "Widget.hxx"
#include "Dialog.hxx"
#include "ToolTip.hxx"
#include "ToggleWidget.hxx"
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -51,6 +53,7 @@ void ToggleWidget::handleMouseDown(int x, int y, MouseButton b, int clickCount)
_selectedItem = newSelectedItem;
_currentRow = _selectedItem / _cols;
_currentCol = _selectedItem - (_currentRow * _cols);
dialog().tooltip().hide();
setDirty();
}
}
@ -182,6 +185,7 @@ bool ToggleWidget::handleKeyDown(StellaKey key, StellaMod mod)
_stateList[_selectedItem] = !_stateList[_selectedItem];
_changedList[_selectedItem] = !_changedList[_selectedItem];
sendCommand(ToggleWidget::kItemDataChangedCmd, _selectedItem, _id);
dialog().tooltip().hide();
}
setDirty();